How to find Serial Number, IMEI number using iOS SDK

前端 未结 2 441
生来不讨喜
生来不讨喜 2020-12-07 02:25

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 Framewor

相关标签:
2条回答
  • 2020-12-07 02:53

    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.

    0 讨论(0)
  • 2020-12-07 02:55

    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.

    0 讨论(0)
提交回复
热议问题