I would like to know how to get a unique identifier of the iPhone (for example its serial number or its IMEI number) in C or Objective-C via the iPhone SDK ?
I would like to get iPhone serial, IMEI and phone number from code too. Is this legal at all, and if so how can I do this? I've found that there is no way to do this with SDK, am I right? The only divice info that I can get is represented in UIDevice class? May be the way to get this info throught unix syscalls exists?
Also phone number doesn't apears as the first record in address book in my case. Is there another way to get it from code?
uniqueIdentifier
A string unique to each device based on various hardware details. (read-only)
@property(nonatomic, readonly, retain) NSString *uniqueIdentifier
Discussion
A unique device identifier is a hash value composed from various hardware identifiers such as the device’s serial number. It is guaranteed to be unique for every device. You can use it, for example, to store high scores for a game in a central server or to control access to registered products.
Availability
Available in iPhone OS 2.0 and later.
Declared In
UIDevice.h......