When creating an iPhone/iPad app using Xcode/Swift you have the above options. The last one will create a version of the app the can run on an “M” series Mac.
Notice it says (Designed for iPad), If I remove iPad as a target, this changes to (Designed for iPhone)
It is ALWAYS
for iPad if iPad is one of the targets
for iPad the macOS version “emulates” an iPad 12.9" at 1024x1366
for iPhone it emulates an iPhoneSE at 375x667
So, does anyone know how to control WHAT the mac version emulates?
I would like to keep iPad as a target, but I want the macOS version to use the SE metrics
curious why your want to run it at such low resolution ?
even emulating an iPhone SE the app is about the same as the Apple Mac Calculator
here is my app running as iPhoneSE along side the Apple Calculator
but showing as an iPad it is over 4x larger
filling the device screen is ok for “mobile”, but on desktop, it should be more of a “widget” that can be moved around as desired (tap the green bubble on mine and it goes FULL SCREEN)
so you cant say its built for iPad and iPhone and macOS without the Mac defaulting to iPad size ?
And probably now way to know the solution of the device and restrict yourself to the smaller size when on macOS (although that seems a weird thing to have to do)
I’d have to poke around in Xcode to see if size classes “might” be appropriate but lord knows
This is a bit beyond what I’ve done so …
Will be curious if you find an answer
size classes do not affect the “screen size” which is basically what I want to be able to choose. Iphones and Ipads all of course have a fixed size depending on the device (UIScreen.main.bounds).
And it seems that Xcode/Swift chooses a base device for you.
If you only say “build for iPhone” it chooses the IphoneSE otherwise the 12.9" iPad and then the rest of the app “thinks” it is running on that device type.
and no obvious way to override that base device setting choice ?
Bummer is right… I’ve spent hours searching, and can’t even find anything that confirms what I stated above, and as such nothing that indicates how to override/change it
great, but it is not a Catalyst app
I tried that option, and got a fatal error which indicatied I was trying to write a specific thing outside the sandbox … a key that I don’t even reference let alone write anywhere
bummer … I’m just poking at anything that even seems remotely possible