Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check if device is Ipad mini [duplicate]

Possible Duplicate:
Dealing with iPad Mini screen size
Is it possible to detect that your iOS app is running on an iPad mini at runtime?

iPad mini has the same resolution as iPad 1(2) (1024x768).

But iPad mini has 7,9 inches, and iPad 1(2) - 9,7 inches.

So the question is how to check if device is Ipad mini.

like image 881
Buron Avatar asked Nov 24 '12 17:11

Buron


People also ask

How do I know if my Apple device is original?

Check the operating system iPhones run on iOS, which is obviously different from the Android operating system. iOS is way more different than Android, in terms of overall look, feel, and performance. Head over to the Settings menu and then to the software tab to check the operating system that the iPhone is running on.

How do I know if my iPad is original?

Head over to Setting > general > about. type in your iPad's serial number to check if it's a genuine iPad. Your Serial Number Will Be Verified,And Will Display Your iPad's Warranty Information If It Is Genuine.

How do you check if the iPad I bought is stolen?

Look for your device on a map To find your device, sign in to iCloud.com/find. Or use the Find My app on another Apple device that you own. If your iPhone, iPad, or iPod touch doesn't appear in the list of devices, Find My was not turned on. But you can still protect your account if Find My was not turned on.


2 Answers

This answer contains a link to an utility method to get a "platform string" that can be used to identify the 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 Models - The iPhone Wiki, the return value of platform is one of

  • iPad2,5
  • iPad2,6
  • iPad2,7

for an iPad mini.

like image 93
Martin R Avatar answered Sep 21 '22 14:09

Martin R


Apple's view is probably that you don't need to know this. :( Your app behaves in every respect exactly the same on an iPad 1 or 2 screen and an iPad mini screen. As far as pixels are concerned they are the same size.

And every other aspect of the device, such as its hardware capabilities (e.g. does it have a camera?) can be checked in the normal way, through the appropriate API for using that hardware.

like image 24
matt Avatar answered Sep 21 '22 14:09

matt