I have a LibGDX project which I can run on all platforms that are supported by LibGDX. Recently I started integrating the Google Nearby Messages API. I got it working on Android through platform-specific code, pretty much like the description on Google says it should be done. Now I want to integrate it in the iOS project, which uses RoboVM, but according to their documentation (https://developers.google.com/nearby/messages/ios/get-started) I should use CocoaPods, which doesn't seem so straightforward for integration, especially in a LibGDX project. I hope someone with some experience in doing this can help me out, or point me to a project in which that's already done. Thanks!
Wednesday, November 22, 2017
Thursday, March 31, 2016
How to identify a user on iOS?
I am using LibGDX and for the Android version of my game I use the "Get Accounts" permission to identify a user by their Gmail address.
Is their a similar way to identify a user for iOS?
3 Answers
Answers 1
According to the App Store Guidelines, you shouldn't get user's personal data without obtaining the user's prior permission. The only identifier you can use anonymously is identifierForVendor:
UIDevice.currentDevice().identifierForVendor?.UUIDString This identifier is common for all your apps on the user's device. If all the apps were deleted from the device, the identifier may change. More.
Answers 2
Your best bet is to use GameCenter on iOS for identifying the players this link provides a little more info on handling users with GameCenter: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/GameKit_Guide/Users/Users.html
Answers 3
According to Apple, you shouldn't identify your users, unless you have a good reason to do so.
Like @Marat said, what you are looking for is the UUID, but keep in mind that this value may change (for example, if the user delete your app and have none of your other apps).
A possible solution would be to keep the UUID value in the keychain, and that way you will always use the same value.
Edit: Since your app is a game, you can use Apple's GameCenter. This will identify the users for you.