Welcome to the Treehouse Community
Looking to learn something new?
How do I restrict my app for only iPhone 6 and 6 Plus?
I am about to release my app but I want to restrict it to iPhone 6 and 6 Plus or for xcode to scale down the down the app for the iPhone 5 and 5S since they have the same 16:9 aspect ratio.
Chris Shaw26,650 Points
There is no way to do this as your app should work for all resolutions and then scale up for the iPhone 6/6+, Apple introduced a new feature in Xcode 6 which is size classes.
What size classes allow you to do is build an app for any iPhone resolution for example without needing to resize your storyboard for the iPhone 6/6+, to use class sizes you simply need to open your storyboard and select the master view (the initial view), next in the file inspector on the right hand side check the box that has size classes next to it, also make sure you have auto layout checked as well.
Now that you have that done you should have seen your views get larger width wise and smaller in height, what you can do from here on out is build your app using size classes and it will appear the same way on all resolutions, for the iPhone 6/6+ you can programatically add/show new views because of the extended real-estate.
Hope that helps.
Sebastien Thomas16,502 Points
Not sure Apple would let you do that.
You could release your app for the very latest version of iOS and that would restrict iPhone 4 users for instance but right now, that's about it.
Brenden Konnagan16,858 Points
Apple has UI tools built into Interface builder that will assist with this. Check out size classes and auto layout. I know that there are some classes regarding them right here at Treehouse, and Apple has some great documentation.
Hope the best!