Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I was wondering if it was possible to find out the UDID of the user's iPhone. Can someone shed some light?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
479 views
Welcome To Ask or Share your Answers For Others

1 Answer

Note: Apple will no longer accept apps that access the UDID of a device starting May 1, 2013.

Instead, you must use the new methods identifierForVendor and advertisingIdentifier in iOS 6+ for accessing this. See related post here for more detail.


Old way (deprecated and will result in App Store rejection)

NSString *udid = [[UIDevice currentDevice] uniqueIdentifier];

As of iOS7, the uniqueIdentifier property is no longer available.

See the UIDevice reference.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...