I developed an app for iPad earlier this year and finally got around to making a version for iPhone. It's a very simple interactive animation built with SpriteKit. The problem is the layout and design elements are all designed to fit the resolution of my iPhone 11. When I submitted it for review and they tested it on smaller devices the layout gets cropped. All of the code is also specific to that screen size since it gets the location of the touch and checks if its x and y value are within the space of a designated button before performing the associated action. Is there a way to only make the app available to iPhone models 11 and newer? If not, what should I do?
iPhone app rejected for UI layout
The problem is the layout and design elements are all designed to fit the resolution of my iPhone 11.
You mean iPhone11 with 6.5" screen ?
That's a very unfortunate design decision. You will have to rework it.
You cannot limit your app to some type of iPhone on AppStore. But, AFAIK, there is no formal requirement to support all devices equally.
However, guidelines say: 2.4.1 To ensure people get the most out of your app, iPhone apps should run on iPad whenever possible. We encourage you to consider building universal apps so customers can use them on all of their devices. Learn more about Universal apps.
And you need also to provide screen shots at least from 6.5" and 5.5" devices: so your app will be checked to work perfectly on both.
https://help.apple.com/app-store-connect/#/devd274dd925
- 6.5 inch (iPhone 13 Pro Max, iPhone 12 Pro Max, iPhone 11 Pro Max, iPhone 11, iPhone XSMax, iPhone XR) Exact Screenshots needed
- 5.8 inch (iPhone 13 Pro, iPhone 13, iPhone 13 mini, iPhone 12 Pro, iPhone 12, iPhone 12 mini, iPhone 11 Pro, iPhone XS, iPhone X)
- 5.5 inch (iPhone 8 Plus, iPhone 7 Plus, iPhone 6s Plus) Exact Screenshots needed
So my catch of it:
- apps must work perfectly at least on 6.5 and 5.5" and 5.8" devices
- 0n 5.8, the reduced 5.5" should be accepted
- You need to find a way for users to run on smaller devices: scrolling the top view may be an option, even though not perfect (but using Safari on a smaller iPhone shows the same limits).
And add a warning in your app description that app best works on 5.5" and over. And let reviewer know it.
Hope that helps.
Do I need to change the code handling the placement of the UI elements using fractions of the screen width and height instead of fixed whole numbers?
I would advise not to do that, that will give a poor result and be pretty complex to manage.
Or do I add a line to the GameViewController that looks for which type of device is being used and then throws to a different set of files with values specific to that device?
I would not do this either.
I see 2 main options:
- Use constraints to position elements relatively to the whole view (or safe area). It will be OK on a larger than iPhone 11, but on a small screen, you will have problem to fit them all. You will probably manage on a 5.5" screen, but will be hard on a 4.7 or worse 4" screen.
- Embed the whole scene in a UIView withy a fixed size equal ti size of the iPhone11 screen. Set constraints relatively to this view
- Then embed this View into a Scrolling view. Set the constraints of the scrollView to the safe area
- In any case, clearly warn on the app description that it best works on screens larger than (iPhone 11 screen)
Result:
- In iPhone 11, you will see no change.
- on larger screens, you will have some unused space, but no scrolling
- on smaller screens, user will have to scroll ; may be a bit tricky for a game.
Figured it out. Just had to change the scale mode from AspectFill to AspectFit