Here is the code to determine the number of cores on an iOS device:
#include <sys/sysctl.h> unsigned int countCores() { size_t len; unsigned int ncpu; len = sizeof(ncpu); sysctlbyname ("hw.ncpu",&ncpu,&len,NULL,0); return ncpu; }
In addition, you can select the [[UIDevice currentDevice] userInterfaceIdiom] check box to determine if the device is an iPhone or iPad. Like this:
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { NSLog(@"iPad"); } else { NSLog(@"iPhone"); }
Link
source share