I am currently developing with Xcode 7.5 betas and Swift 2. I have chosen for my project to run on all iPhones. However, I do not want to run it on iPhone 4s as the screen size is too small. Is there anyway I can have it run on iPhone 5 - 6s only?
Asked
Active
Viewed 1,089 times
1 Answers
5
You can limit what iPhones can run your app using the information property list (Info.plist) file. "The UIRequiredDeviceCapabilities key lets you declare the hardware or specific capabilities that your app needs in order to run" however, this is based on handset capabilities not characteristics. It won't let you limit the applicability by screen size but you can get a similar result by finding common capabilities in your targeted handsets that aren't shared by the hardware you want to rule out.
Use the Device Compatibility Matrix linked below. Although I'm not sure how you can rule out the 4s, without ruling out the 4, there are a couple options for ruling out all iPhones prior to the 5S.
Good luck!

Joel Nieman
- 746
- 4
- 13
-
Just to make sure I am doing it right - currently there is an "Item 0" within the Required device capabilities that is set to "armv7". According to the website, armv7 is compatible with all phones 4 - 6+. I should replace armv7 with the type of compatiblity I want (as per the website). Is that right? – Pranav Wadhwa Aug 25 '15 at 11:49
-
You can try adding an item 1 and using something more limiting such as Metal or opengles-3. Since these are bold on the matrix you must build your app as a fat binary (armv6 and armv7) or require a minimum iOS version of 4.3 or later. – Joel Nieman Aug 25 '15 at 22:24
-
How do you check to see if your change has actually worked? I added an option to the info.plist that allows only iPhones 5s - 6+ to be compatible. However, I am still able to run the project on iPhone 4s and 5. How do you check the compatible devices? – Pranav Wadhwa Aug 28 '15 at 14:23