This answer provides a link to a useful method to get a "platform string" that can be used to identify various iOS devices. I copy the main method here for your convenience:
#include <sys/types.h> #include <sys/sysctl.h> - (NSString *) platform { size_t size; sysctlbyname("hw.machine", NULL, &size, NULL, 0); char *machine = malloc(size); sysctlbyname("hw.machine", machine, &size, NULL, 0); NSString *platform = [NSString stringWithUTF8String:machine]; free(machine); return platform; }
According to the Model - Wiki for iPhone , the return value of platform is one of
for iPad mini.
Martin r
source share