5

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?

Z0q
  • 1,689
  • 3
  • 28
  • 57

3 Answers3

14

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.

Marat Saytakov
  • 393
  • 1
  • 8
  • That sounds just great. Is this also available in Java via RoboVM? And can I ask for a permission in a way similar to Android? That would be great – Z0q Mar 25 '16 at 14:00
  • This is a public API, so I guess it's available via RoboVM too. And you don't need a permission for it, it's open to use an anonymous id. (We are using this id to link up the session on a backend with a user, without requesting any sign up via Facebook or email.) – Marat Saytakov Mar 26 '16 at 08:53
6

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.

Emzor
  • 1,380
  • 17
  • 28
zfetters
  • 447
  • 2
  • 11
4

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.

Emzor
  • 1,380
  • 17
  • 28
Witterquick
  • 6,048
  • 3
  • 26
  • 50