bobzsj87
bobzsj87

Reputation: 818

How to get iOS's unique identifier from app?

I have checked online that getting IMEI must use private methods and thus violate the agreement and might be rejected. What I need is not the IMEI number, but any unique identifier of the phone, it can be meaning less or do

Upvotes: 1

Views: 1163

Answers (2)

RedBlueThing
RedBlueThing

Reputation: 42522

As of iOS 5.0 this property is deprecated and Apple advises that you create your own unique app id:

Do not use the uniqueIdentifier property. To create a unique identifier specific to your app, you can call the CFUUIDCreate function to create a UUID, and write it to the defaults database using the NSUserDefaults class.

Upvotes: 0

ceejayoz
ceejayoz

Reputation: 179994

[[UIDevice currentDevice] uniqueIdentifier]

Upvotes: 8

Related Questions