Mac (designed for iPad) builds locally an M1 app but does not archive as M1 app

I am lost!

I have a nice little iOS app for iPad and iPhone and thought, oh, let's pick that low-hanging fruit of making this iOS app available for M1 macOS devices (only) with virtually no effort according to this instruction:

https://developer.apple.com/documentation/uikit/mac_catalyst/creating_a_mac_version_of_your_ipad_app

That description is a bit dated, but it seems that when I add the target 'Mac (designed for iPad)', I get what I want: "Run your unmodified iOS app on Mac Computer with M1 chip" it says in the byline in Xcode. That is exactly what I want. Perfect!

And indeed, I can switch to "My Mac (designed for iPad)" target, build everything, and get a standalone Mac application on my Mac that is NOT in the Simulator. It is my iOS app, but now as Mac app, and it seems to work. Perfect!

But, hmm, double checking - I do not see the sandboxing field in signing (yet I do see the app is sandboxed when checking in Activity Monitor).

And when I try to upload to AppStore, I seem to upload the iOS variant, regardless of what I am trying. Nothing ever arrives at the store that would show up as a build for the macOS variant of my app.

I need to add as target Mac (so without the designed for iPad), to get the sandbox input fields become visible. I then can also create a Mac Archive.

But alas, it does not build then...

LaunchScreen.storyboard error build: iOS storyboards do not support target device type "mac".

So, what do I need to do to get this simple, low-hanging fruit of "My Mac (designed for iPad)" , where the sandboxing input fields are shown, the whole thing archives for macOS, and it all still works without having to touch the code at all.

Or it archives as iOS, but I can pick up the archive submitted to AppStore in the macOS section of my App. I do not mind which way, as long as I get the low-hanging fruit promised to me in the byline by Xcode.

Thanks a bunch, Mathias

Xcode 14.0.1

Using latest terminology, you have 3 options for the Mac part of a cross-platform (macOS/iOS) app:

  1. Mac (designed for iPad)
  2. Mac Catalyst
  3. Mac

These are all available as destinations in Xcode 14.1 — a "destination" not being quite the same thing as a target.

For #2 and #3, the macOS destination does correspond to a separate target.

But for #1 — the option you want — there's no separate target. All you need to do is build your app for iOS, and it will automatically be available for M1 Macs through the App Store. If you remove the unbuildable target you recently added, everything should be fine. Just don't remove the "Mac (designed for iPad)" destination!

Note: The significance of the "Mac (designed for iPad)" destination is that you can remove it if you do not want users to run the app on Macs.

@Polyphonic What should i do if i wanted to use iPhone device on MacOS? Previously when i have only iphone in destination, it appeared as "Mac (Designed for iPhone)", but after i added iPad, it auto changed to "Mac (Designed for iPad)". Now it's running on iPad device in TestFlight when opening from M1 Macs. How do I get it to run on iPhone device?

Mac (designed for iPad) builds locally an M1 app but does not archive as M1 app
 
 
Q