We need to uniquely identify the device and it has to be same across installs (reinstall). We have been using identifier stored in keychain till now so it persists across installs. Now with 10.3 beta the key chain is auto deleted when the app is uninstalled. Ref: https://forums.developer.apple.com/thread/72271
Can we use AdIdentifier as unique identifier. We have ads served and we are at the moment using it for the same.
Your UDID is a unique identifier that Apple uses to associate a device to an iOS developer account.
The uuid on iOS is not unique to a device, but varies for each application, for each installation. It changes if you delete and re-install the app, and possibly also when you upgrade iOS, or even upgrade the app per version (apparent in iOS 5.1). The uuid is not a reliable value.
Apple device IDs Every Apple iPhone, iPod touch and iPad has a unique device ID number associated with it, known as a Unique Device ID (UDID). Apple's device ID is a 40-digit sequence of letters and numbers. Customers can access their device ID numbers in iTunes or by downloading a free app from the Apple App Store.
There seems to be a workaround. It's actually mentioned in the forum you linked.
By making the keychain item available to other apps you can ensure it won't be deleted when your app is deleted.
To do that, you can add the item to kSecAttrAccessGroupToken
access group on iOS 10. See https://gist.github.com/Raztor0/34ad0e23a410c33526c9fa1b6e8d281c
If you set the access group to this well-known group, your keychain item will be readable by all installed apps:
Every application has access to this access group so it is not needed to explicitly list it in keychain-access-groups entitlement, but application must explicitly state this access group in keychain queries in order to be able to access items from external tokens.
That makes the item unsuitable for any sensitive or secret data (e.g. passwords, user names etc). For a unique identification of devices this shouldn't matter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With