Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to identify iOS device uniquely instead of using UUID and UDID [duplicate]

In my iOS app, I have to restrict the user to use iOS app per device. To do this I found a solution that we can use the UUID (Universally Unique Identifier) or UDID (Unique Device Identifier). But according to this answer I can't use UUID, because if app gets deleted or reinstalled UUID has been getting changed and I don't want this. Also Apple rejects apps if app uses UDID.

Is there any way to identify iOS device uniquely.

like image 956
Kirti Nikam Avatar asked Jun 19 '15 10:06

Kirti Nikam


2 Answers

Apple has done away with the approach of UDIDs and will reject apps that use the same for unique device identification. Source: TNW

What you are looking for is Vendor ID

like image 175
Vijay Tholpadi Avatar answered Nov 15 '22 20:11

Vijay Tholpadi


I'm using this library for my projects, and it's working like a charm, please try :

https://github.com/blackpixel/BPXLUUIDHandler

easy to use :

Import BPXLUUIDHandler.h Retrieve the UUID with

[BPXLUUIDHandler UUID]

Thats all...

Here is some info from project's github page :

As of iOS 5, Apple has deprecated the device unique identifier api and hasn’t provided a friendly Obj-C replacement, instead recommending CFUUIDCreate and NSUserDefaults.

CFUUIDCreate isn’t very complicated and neither is NSUserDefaults, but this solution fails in a few different ways:

  • It’s not a quick one-shot call to get the UUID; you have to write your own wrapper to make it friendly
  • It doesn’t persist; deleting the app blows away the UUID (can be persisted if stored in the keychain though)
  • There’s no way to share it between apps
like image 25
mgyky Avatar answered Nov 15 '22 20:11

mgyky