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?

Cœur
  • 37,241
  • 25
  • 195
  • 267
user1066642
  • 125
  • 1
  • 2
  • 9

2 Answers2

1
NSString *imeinumber = [[NetworkController sharedInstance] IMEI];
jscs
  • 63,694
  • 13
  • 151
  • 195
Nitin
  • 7,455
  • 2
  • 32
  • 51
  • 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 08 '12 at 08: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.

Community
  • 1
  • 1
Ravi Kumar Karunanithi
  • 2,151
  • 2
  • 19
  • 41