I am trying to build an app with Xcode 10.2.1 and submit it to the Mac App Store.
However, when I archive it, the Organizer does not show my app's version, and the button on the right is titled "Distribute Content" and not "Distribute App" as it should. And I won't get to option to upload the to Store.
When I export to disk, I see that the archive contains a "Products" folder at the top level, and then multiple folders containing all my included sub projects, containing frameworks and helper tools.
As all these are already linked into the app, I don't need to have them also in the Archive as separate items, of course. And I suspect that's the reason why I can't submit the app from the Organizer.
If I make a regular build, the build/Release folder only contains the app, not the other products.
What could I be doing wrong, i.e. how to I prevent the products from the sub projects to be included in the main project's Archive?
I need to keep these other projects inside the main project so that I do not forget to build them when I change code in one of their source files.
The main project shows the other projects in the left browser when I open its disclosure triangle.
The main project's target's Build Phases also lists these sub project's targets.
The Scheme, under Build, shows the main project's target, with the other targets are children. All checkboxes are ticked.
The Scheme, under Archive, selects the Release build config.
For now, I build the app regularly, then use the cmdline tool as follows to create a pkg file that I then upload with Apple's Application Loader:
productbuild --component "MyApp.app" /Applications --sign "3rd Party Mac Developer Installer: My Name" "MyApp.pkg"
The fact that this works suggests that my app is fine. It's just the added products that are causing the trouble for the Organizer.
As suggested in this Tweet, the solution is to set "Skip Install" to YES in every sub project's Build Settings.