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?
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?
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.
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.
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.
© 2022 - 2024 — McMap. All rights reserved.