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.
Here is a common method of retriving the device model. There are no NS methods for this, so you gotta use c
#include
#include
- (NSString *)machine {
NSString *machine;
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *name = malloc(size);
sysctlbyname("hw.machine", name, &size, NULL, 0);
machine = [NSString stringWithUTF8String:name];
free(name);
return machine;
}