I am working on app which needs to check the iphone model, but I\'m not able to find any solution. I will be thank full for any suggestion.
For my purposes I've written a tiny library that abstracts away the underlying C calls and presents an Objective-C interface.
NSLog(@"Big model number: %d", deviceDetails.bigModel);
//Big model number: 4
NSLog(@"Small model number: %d", deviceDetails.smallModel);
//Small model number: 1
if (deviceDetails.model == GBDeviceModeliPhone4S) {
NSLog(@"It's a 4S");
}
//It's a 4S
if (deviceDetails.family != GBDeviceFamilyiPad) {
NSLog(@"It's not an iPad");
}
//It's not an iPad
NSLog(@"systemInfo string: %@", [GBDeviceInfo rawSystemInfoString]);
//systemInfo string: iPhone4,1
It's on github: GBDeviceInfo