0

Possible Duplicate:
How to get IMEI on iPhone?

How can I get the IMEI from an iPhone programmatically?

Is there a framework I have to add to my project?

1

2 Answers 2

1
NSString *imeinumber = [[NetworkController sharedInstance] IMEI];
1
  • 3
    You might want to add that this is from a private framework. (See the question Unknown linked to in his/her answer.)
    – matsr
    May 8, 2012 at 8:09
-1

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;

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

6
  • [UIDevice currentDevice].uniqueIdentifier is deprecated
    – hypercrypt
    May 8, 2012 at 8:40
  • No apple can't reject If u do not use obtain IMEI. Read apple document. May 8, 2012 at 9:05
  • 1
    i'm also get uniqueID and ran it my app, and now my app currently in appsotre. u read carefully. ok. May 8, 2012 at 9:55
  • If u use NetworkController *ntc = [NetworkController sharedInstance]; NSString *imeistring = [ntc IMEI]; u will get ur imei of ur iphone. apple rejected a app of @nehasoni. Bcz this person using this code. So rejected by apple. If u use UniqueId of iphone, apple never reject the app. cool :) May 8, 2012 at 11:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.