Get the Model Name of the iOS Device

Apple does not provide an NS function for getting the device model. However, the following code can achieve task:   #include <sys/types.h>  #include <sys/sysctl.h> – (NSString *)deviceName {        size_t size;      // get the size of the returned device name      sysctlbyname(“hw.machine”, NULL, &size, NULL, 0);       // Allocate

Read More…

 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments