I want unique identifier string for iPhone devices instead of UDID
and MAC
.
1. Get UDID
and MAC
are deprecated by apple.
2. We can use UUID
but it will get change after reinstalling app or delete app.
I want any unique value of device which is remain same after app reinstall OR delete OR upgrade iOS version.
Most mobile devices have a unique ID, also called a Universal Unique Identifier (UUID), assigned at the time of manufacture for identification purposes. For example, iOS devices are assigned what's called a Unique Device Identifier (UDID).
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.
What you can do is get a unique identifier using [[UIDevice currentDevice] identifierForVendor]
or any other unique identifier generator. After that, you should store that value on keychain using KeychainItemWrapper
and use. Once you store a value on the keychain it'll not remove even after you delete and reinstall the app.
Here is a guide for keychain access - Link
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