My iPhone app is not universal but it has a feature that I'd like to enable for people playing on iPads. Is there some way to detect that you're running on an iPad in compatibility mode? The UIDevice methods for detecting machine specs all return the values you would get on an iPhone (on the simulator at least). The only thing I can think of is detecting OS 3.2, but that technique won't work for long.
What compatibility mode exactly? If you right click on the iTunes shortcut, then on Properties, then on the Compatibility tab, you can change or turn off the Windows Compatibility mode it may have applied.
Some iOS apps are for iPhone only, but that doesn't mean you can't download iPhone apps onto an iPad and use them on iPad too. Many iPad users would rather use the scaled up iPhone version of an app that is intended for a different screen device than no version of the app at all.
Originally answered here: https://stackoverflow.com/a/14864400/577237
Reposted since it's so short:
If the app is an iPhone app running in the emulator mode on an iPad, it will have a userInterfaceIdiom of Phone, but a model type of iPad. You can check this with the following code:
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone &&
[[[UIDevice currentDevice] model] hasPrefix:@"iPad"]) {
// This app is an iPhone app running on an iPad
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With