1

I have an iOS app, and I only want it to run on iPhone 6 and 6 plus, how do I disable the app for older versions of iPhone?

zbz.lvlv
  • 3,597
  • 6
  • 34
  • 38
  • 1
    possible duplicate of [Disabling old devices support for developed app in xcode](http://stackoverflow.com/questions/20874979/disabling-old-devices-support-for-developed-app-in-xcode) – almas Oct 19 '14 at 05:06

2 Answers2

4

You cannot prevent users from downloading it off of the app store. I suggest that you use auto layout to allow your objects to be displayed properly on all display sizes.

user3721428
  • 298
  • 1
  • 4
  • 14
0

Get iOS device version in AppDelegate and show message there this device not supporting iOS 7 or previous

Use them like this:

if (SYSTEM_VERSION_LESS_THAN(@"5.0")) {
    // code here
}

if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0")) {
    // code here
}

Outdated version below

to get OS version:

[[UIDevice currentDevice] systemVersion]

returns string, which can be turned into int/float via

-[NSString floatValue]
-[NSString intValue]

like this

Both values (floatValue, intValue) will be stripped due to its type, 5.0.1 will become 5.0 or 5 (float or int), for comparing precisely, you will have to separate it to array of INTs check accepted answer here: Check iPhone iOS Version

NSString *ver = [[UIDevice currentDevice] systemVersion];
int ver_int = [ver intValue];
float ver_float = [ver floatValue];

and compare like this

NSLog(@"System Version is %@",[[UIDevice currentDevice] systemVersion]);
NSString *ver = [[UIDevice currentDevice] systemVersion];
float ver_float = [ver floatValue];
if (ver_float < 5.0) return false;
Community
  • 1
  • 1
Danial Hussain
  • 2,488
  • 18
  • 38