1

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.

Yogesh Nikam
  • 633
  • 5
  • 20

2 Answers2

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.

Community
  • 1
  • 1
Code
  • 6,041
  • 4
  • 35
  • 75
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