Andrey Chernukha
Andrey Chernukha

Reputation: 21808

How to prevent iphone app from running on non-retina device?

I want my app to run on Retina devices only. How do i disable supporting non-Retina iPhone? Is that possible?

Upvotes: 1

Views: 648

Answers (2)

viral
viral

Reputation: 4208

As the screen size is same for iPhone 3G, 3Gs, 4, 4S; You won't be able to find out which one is retina display among them (AFAIK). But, from iPhone4 the device is having front facing camera, so, You can use that. You can have your App require front-facing camera (Just an example; there are other hardwares too, newly introduced from iPhone4) device capability.

These are specified in the plist file for the app using the UIRequiredDeviceCapabilities key.

A front-facing camera, that would limit it to those devices that have that, eliminating the 3G and 3GS (They are Non-retina displays).

For more details UIRequiredDeviceCapabilities

Upvotes: 8

Hemang
Hemang

Reputation: 27050

It may work! A hacky way!

You need two images temp.png and [email protected]

In your first view controller take a UIButton hidden from view, set background image of it --- temp.png, when your viewDidLoadcalled, that will set the background image for that button, after that, you can check with if([buttonObject currentBackgroundImage] == [UIImage imageNamed:@"[email protected]"]) then its a retina support device, you may show some message to user, or do whatever you want to!

Upvotes: 1

Related Questions