App not full screen on iPad mini 6

Our app uses UIRequiresFullScreen=YES and runs on iPhones and iPads and we've rebuilt it using XCode 13.2.1 with SDK 15.2 as per Apple's instructions - https://developer.apple.com/news/?id=oefg5bhp

However our app still doesn't appear full screen on the iPad mini 6, it has black bars and in the debugger we can see that the window frame is 1024x768.

Is there something else not mentioned in Apple's instructions above that we need to set?

Replies

I tested an app with UIRequiresFullScreen=YES and Xcode 13.2.1 on iPad mini 6 simulator (iOS 15.2) and cannot replicate the issue.

Could you post a screenshot ?

have you a small project to replicate ?

I've attached a screenshot. Our app, EasyCockpit is free in the app store, latest version in the app store has been compiled with XCode 13.2.1 and SDK 15.2 -

https://apps.apple.com/us/app/easycockpit/id542957397

What are the constraints defined for the whole view (which contains map + tabs at top + icons at bottom).

Could you show equivalent screenshot on another device ?

Here is an equivalent screenshot from a different iPad, from our app store listing. We've been on the app store for close on 10 years with our app scaling to use the full screen on all the different iPads before the iPad mini 6 and across all the different iPhones, i.e. a range of resolutions and aspect ratios without this issue before.

Also noticed in the debugger that mainscreen bounds also returns 1024x768.

When I test

          let size = UIScreen.main.bounds.size
          print(size)

in simulator for iPad mini (6th generation), I get

(744.0, 1133.0)

Which corresponds effectively to 1488 * 2266 pixels (3/2 form factor). And not 1024x768 as you (which is iPad mini 5th generation screen size with 4/3 form factor).

Could you test UIScreen.main.bounds.size in code ?

Note: the screen form factor has changed with 6th generation. Could this cause the problem if you scale the map image with this old (4/3)form factor ?

If that is the case :

  • original image ratio for 1024 * 768
  • scaled for new width : 744 -> height scaled to 992 (4/3 format);
  • hence you loose 1133 - 992 = 141 (12.4%) in height (will be empty, black areas if background is black), i.e., 70 on top and bottom. Which seems to be exactly what you get.

Just for the sake of testing, did you try:

UIRequiresFullScreen = NO

I did check UIScreen.main.bounds.size in code which is where I was seeing 1024 x 768 in the debugger. Almost appears as if something is preventing the OS from recognizing that the app has been built with XCode 13 and SDK 15.2 and so it's running the app as if it's been built using XCode 12 etc.

There are 7 distinct logical resolutions covering all the different iPad models and our app gets the full screen size and sizes itself full-screen for all of them except the iPad Mini 6 running iPadOS 15.

https://iosref.com/res

Over the last couple of days I have tried changing a bunch of other settings to see if they would make difference, so I did set UIRequiresFullScreen = NO but it made no difference. I changed other things like changing the minimum system version from 8 to 15, also no difference.

Really frustrating, Apple claims all you need to do is rebuild with XCode 13 and SDK 15, but something isn't quite working for our app with just that change.

I do think it has to do with form factor change, not only the size.

What is confusing is that I do not see the problem here in simulator.

  • Do you use Xcode 13.2.1 (build 13C100) ?
  • Would you mind showing the code that displays the map, or the settings for the imageView in IB ?

Yep, XCode 13.2.1 (13C100). I'm also using the simulator to test since I don't have a physical iPad mini 6.

I use a nib file, both the window and the image view are set for scaleToFill, but the issue is the OS is telling the app that the main screen bounds are 1024x768. So the window and the image view scale to fill 1024x768.

        <window clearsContextBeforeDrawing="NO" contentMode="scaleToFill" visibleAtLaunch="YES" id="2">
            <rect key="frame" x="0.0" y="0.0" width="320" height="460"/>
            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
            <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
        </window>

                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" id="24" customClass="UIImageViewSurfaceBacked">
                        <rect key="frame" x="0.0" y="0.0" width="320" height="416"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <gestureRecognizers/>
                        <inset key="insetFor6xAndEarlier" minX="0.0" minY="20" maxX="0.0" maxY="0.0"/>
                    </imageView>

Jut to test, could you try to change the content mode to different values (e.g., aspect fill) ?

What are this frames ? Do they deal with the image ?

<rect key="frame" x="0.0" y="0.0" width="320" height="460"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="416"/>

If you are seeing 1024x768 points, for an iPad Mini 6, then you have a problem somewhere.
As @Claude31 says, this is not the size of an iPad Mini 6, which is 2266-by-1488 pixels, or 1133 x 744 points.

You may need to double-check why you are reading the incorrect dimensions.

(I have a Mini 6, if a "real" device could help in some way.)

I did try other values like aspect fill but they made no difference. Which makes sense once I noticed that the UI main screen bounds are 1024x768, the window isn't going to fill out to anything larger if the screen bounds have been limited by the OS to 1024x768.

If you are seeing 1024x768 points, for an iPad Mini 6, then you have a problem somewhere

The original Apple link I mentioned https://developer.apple.com/news/?id=oefg5bhp says that if the app is compiled using XCode 12 and sets UIRequiresFullScreen=YES then the app won't receive access to the full screen. Which is what is happening in my case even though I've compiled using XCode 13.

In a new Project, running on Xcode Simulator:

  • iPad mini (6th generation)

UIScreen.main.bounds.size: 744 x 1133

  • This is what I would expect

Turn on "Requires full screen"

  • Still 744 x 1133 (which is what I would expect

I don't see where your 768 x 1024 is coming from!

Xcode 13.2.1 (13C100)

I don't see where your 768 x 1024 is coming from!

Yep, that's the question. It's as if iOS on the iPad mini (6th generation) doesn't think our app has been compiled with XCode 13 even though it has.

So since it thinks our app isn't aware of the new iPad mini 6's new resolution and aspect ratio it runs apps with "requires full screen" and compiled with pre-XCode 13 with the resolution of the older iPad mini model and letter boxes them.

Did you try clearing the contents of the Derived Data folder?

Product > Clean Build Folder

Or the more drastic version

  • Quit Xcode
  • Delete the contents of the "Derived Data" folder
  • Run the app again

Yep, have tried multiple clean builds.