How to get a unique device identifier from IOS

Asked

Viewed 137 times

0

In the development to Android it is possible to define whether a smartphone is unique through your IMEI or MAC, and perhaps not the best way to identify only a mobile device, but works very well.

On the other hand the Apple no longer allows developers to obtain the MAC nor the IMEI of mobile devices.

I am aware that it is possible to use CFUUIDCreate to get a Unique Identifier, but this identifier will only be available until the user uninstalles the application, and if he re-installs the identifier will be another.

How to get a unique ID for an IOS device regardless of whether the user uninstalled the application?

  • I do not understand why this question received a closing vote for being outside the scope since according to the "Help Center", this question fits the topic "a specific programming problem", ie the problem is a second alternative of how to identify a device other than by IMEI.

1 answer

2


One possible solution is to save the handle in Keychain. This way there is how to recover it if user delete the app and install again. There are some libraries that implement this functionality, for example FCUUID.

In iOS 11 Apple introduced the Devicecheck framework, which allows saving two bits that are persisted even if the app is reinstalled or the user transfers data from one device to another. That one video WWDC explains how it works, from the 24th minute.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.