I want to know the serial number of my iPhone using my application. I have writen code below.
- (NSString*)getSerialNumber { CFTypeRef serialNumberAsCFString;
You should change the argument 2 of IORegistryEntryCreateCFProperty from CFSTR (kIOPlatformUUIDKey) to CFSTR (kIOPlatformSerialNumberKey). Then you will get the correct serial number(with length of 11 characters).
IORegistryEntryCreateCFProperty
CFSTR (kIOPlatformUUIDKey)
CFSTR (kIOPlatformSerialNumberKey)