As I have searched for the same. but, I didn't get proper solution for that as Apple is deprecated this Unique id from iPhone 6 onwards.so how to get the unique id of iPhone in ionic which will remain same in the reinstallation of an app.
Asked
Active
Viewed 2,452 times
2 Answers
4
It's not possible to get a unique device ID.
You can generate it yourself then store it in the device.
Or you can use UIDevice.currentDevice().identifierForVendor!.UUIDString
, which is:
An alphanumeric string that uniquely identifies a device to the app’s vendor.
It may be possible to persist this ID across reinstallations using KeyChain. See this topic.
-
but if i format the device then this generated id is cleared. – Yogesh Nikam Jun 22 '16 at 12:19
-
1what if we store it in keychain ? I think keychains data does not wipe out in case of uninstallation – Umair Afzal Jun 22 '16 at 12:24
-
Umair u are right but if i format the phone then all data is cleared – Yogesh Nikam Jun 22 '16 at 12:25
-
@yogi I am afraid then there is no method for keeping the data even after formating the device. – Umair Afzal Jun 22 '16 at 12:33
0
The best you can now do for identification purposes is to use a UUID (universally unique identifier) using $cordovaDevice.
Furthermore, there are few methods to fetch unique identifiers.

Tomislav Stankovic
- 3,080
- 17
- 35
- 42