I know as of macOS 11.1 it is now possible to run your iOS/iPadOS apps in fullscreen on silicon Macs. Though I couldn't find anything online of how to do this. How would I go about making my app compatible?
How do I allow my iOS app to run in fullscreen on M1 Macs?
The best way to do this is to make your app iPad Multitasking aware.
If you are not ready to support multiple scenes (windows), you may also set the UIRequiresFullScreen
key in your Info.plist
to false
to allow your single-window app to be resized and set to full screen on M1 Macs.
Where is an Apple code example that sets all this up? Having a single post about this on the forums is not enough. The link above is not informative. We don't want multiple windows, we just want a single resizable window of an iOS title. Other posts state that you must be iPad Multitasking aware, and that requires several settings.
If you want a freely resizable window, you will indeed need to make your app iPad Multitasking capable. Specifically, you will have to add support for resizable scenes. On iPad this gives you Split View and Slide Over support, whereas on the Mac you get a resizable window. You are not required to add support for multiple scenes to get a resizable window.
However, you might have UIRequiresFullScreen
set to true
, because you do not want your scene to be live-resizable. But you may still want your window to start out full screen, fitting the Mac display edge-to-edge (e.g. if your app is a game). If so, take a look at the new Info.plist
keys UISupportsTrueScreenSizeOnMac and UILaunchToFullScreenByDefaultOnMac. These keys are also discussed over here.
A freely resizable window will start out in window mode, but it will be automatically resized to fit the current screen during the full screen transition, if the user decides to take it full screen.
A fixed-size window can be taken full screen automatically via UILaunchToFullScreenByDefaultOnMac
, but its size is fixed at launch time, so it can only be made to fit the launch-time display via UISupportsTrueScreenSizeOnMac
.
That link is not sufficient. It doesn't deal with resizing the view. I can disable UIRequiresFullscreen to turn the app into a multitasking app. Then I get the window resizing running on macOS M2. The app just draws at the same res, and the grid does resize to the window boundary. It's just downsampling the grid, and it looks terrible. We need a sample showing how to handle resizing to actual window boundaries, so an iOSApponMacOS operates like a real macOS app. There are still bugs with HDR support always reporting 1.0, but it's simpler than dealing with Catalyst.