0

Possible Duplicate:
How to get IMEI on iPhone?

how can i get IMEI code from iphone simulator?

Community
  • 1
  • 1
user292117
  • 1
  • 1
  • 3

4 Answers4

2

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.

Jasarien
  • 57,071
  • 27
  • 154
  • 186
  • 1
    i doubt that the simulator even has an IMEI somewhere... what would it be needed for? –  Mar 16 '10 at 10:15
  • You're correct, the simulator has no IMEI, only a physical iPhone would have one. iPods won't have one either, which is probably why there's no access to it. – Jasarien Mar 16 '10 at 10:16
1

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.

Community
  • 1
  • 1
Vladimir
  • 167,138
  • 35
  • 380
  • 310
0

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

diegor
  • 75
  • 1
  • 8
0

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

Barrie Reader
  • 10,474
  • 11
  • 67
  • 132