A discussion of the uniqueIdentifier property in the documentation states:
Do not use the uniqueIdentifier property. To create a unique identifier specific to your application, you can call CFUUIDCreate to create a UUID and write it to the default database using the NSUserDefaults class.
Writing it by default should ensure that it will be saved if the application is uninstalled / reinstalled. I would think.
Edit:
Sorry, they are not saved when you uninstall the application . The documentation describes how to generate a UUID, but I cannot find out if it is persistent for a given user / device. I have seen some people suggest using keychain for persistence when uninstalling / reinstalling the application, but they donβt know how much it is recommended (and in any case, the user can, I suppose, delete entries).
source share