开发者

IMEI number using iphone code [duplicate]

This question already has answers here: Closed 10 years ago.

Possible Duplicate:

How to get IMEI on iPhone开发者_Python百科?

how can i get IMEI code from iphone simulator?


You can't. It's not something you can do with the iPhone SDK.

You can get the iPhone/iPod's Unique Device Identifier (UDID), but not the IMEI, Serial or phone number.


As others stated - you cannot get IMEI through public API. If you want to obtain some device identifier to use in your application you must use uniqueIdentifier property defined in UIDevice class - it is there for exactly that purpose.

NSString* uniqueID = [UIDevice currentDevice].uniqueIdentifier;

FYI, you can obtain IMEI using private frameworks - see this question, but your app will be rejected from app store then.


IMEI is an HW code of each phone. You can get phones' IMEI typing: *#06*. In iPhone simulator there is no IMEI.


I'm not sure that it's possible - besides which, Apple will moan if you publish software which does that on the AppStore...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜