Solved: iOS demo app resolution always 320,480

I am currently experimenting with the Xcode-iOS Demos from SDL-release-2.30.8. These all run at 320,480 even on retina displays. This creates letterboxing / pillaring (depending on the orientation).

Here is my quest: How can I modify any of the demo apps to use the full display?

Details:
I have an SDL2 app that we are porting from Linux and MacOS to iOS. The app runs fine except that it is always in 320,480 (or 480,320) resolution. I’ve spent a few long days searching, reading manuals and forums attempting different approaches with LaunchScreens, Default images, various parms sent to SDL_CreateWindow, SetWindowFullScreen, GetNumDisplayModes, GetDisplayMode, etc. I’m at a bit of a loss how to set the window size to something other than 320,480.

The most relevant post that I’ve found does not lead to an ideal solution (ditch SDL for iOS): iOS full screen resolution issue - #6 by SeanOConnor

Ok, found a solution. You simply need to add a “Launch screen interface file base name” entry to the application’s ‘custom iOS Target Properties’. The entry is “LaunchScreen”.

To get a properly formatted LaunchScreen.storyboard I downloaded the sample application “UsingMetalToDrawAViewContentsents” from Apple’s developer site. Simply drag and drop the LaunchScreen from one Xcode project to the other.

Here is a link to the sample project:
Using Metal to Draw a View’s Contents | Apple Developer Documentation

I’ll mark the title as ‘solved’ :slight_smile: