Want to access the contents of the iPhone General Settings in my application

I have an iPhone with iOS 7, and I want to access information (for example, settings β†’ General β†’ About). In fact, I want to get IMEI and other materials about the controller. Any hint hint would be highly appreciated.

+6
source share
1 answer

There is a lot of information in the MobileGestalt library, check its title here

add this to your makefile

xxx_LIBRARIES = MobileGestalt

then declare:

OBJC_EXTERN CFStringRef MGCopyAnswer(CFStringRef key) WEAK_IMPORT_ATTRIBUTE; 

in the header file

then to get the IMEI number you must use:

 CFStringRef IMEINumber = MGCopyAnswer(CFSTR("InternationalMobileEquipmentIdentity")); NSLog (@"IMEI Number : %@", IMEINumber); 

GoodLuck ..

+2
source

All Articles