kiri
kiri

Reputation: 2007

How to find Serial Number, IMEI number using iOS SDK

In my project i want to get the serial number and IMEI number using iOS SDK, What API's we can use to get in iOS7. I went through few links where they are using IO Frameworks, If we use those Apple will reject the App. How can we got forward.

Upvotes: 8

Views: 18048

Answers (2)

hris.to
hris.to

Reputation: 6363

Apple forbids retrieving such information, as this is potentially harmful to the end users. Instead they provide you with identifierForVendor:

An alphanumeric string that uniquely identifies a device to the app’s vendor. (read-only)

refs: https://developer.apple.com/library/ios/documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/identifierForVendor

If you need to distinguish different apps from same vendor(on same device) you could use advertisingIdentifier, however docs clearly states it must be used only when it is in duty of ads(whether contributing install to an ad, or presenting ads in your app). Moreover I had application rejected because it was using this id, and was not declared in iTunesConnect.

An alphanumeric string unique to each device, used only for serving advertisements. (read-only)

refs: https://developer.apple.com/library/ios/documentation/AdSupport/Reference/ASIdentifierManager_Ref/ASIdentifierManager.html#//apple_ref/occ/instp/ASIdentifierManager/advertisingIdentifier

If you still decide to go for the latter one, don't forget do add AddSupport.framework to you project settings.

Upvotes: 7

rckoenes
rckoenes

Reputation: 69469

Apple does not allow you the retrieve any device specific information like IMEI, UDID, Mac address, serial number, etc..

This has to do with the misuse of these identifier and the privacy of the user.

Upvotes: 19

Related Questions