The process of building and submitting an app to either of the Apple App Stores has become the stuff of legend. In the past, it really hasn't been easy. It seemed to change regularly, was documented poorly, and generally seemed to be absurdly difficult.
Fortunately, things became a lot easier with the release of Xcode 8, which offered what it calls ad hoc code-signing, meaning that in most cases, Xcode will know which certificates and profiles you need, and will talk to the Apple developer portal any time something is missing.
The old way, the hard way, is still available, if you or your organization needs it, but this chapter will make full use of the new ad hoc signing. It's not only easier, it also happens to just work, as they say.
You may well have already successfully submitted an app to the Mac App Store in the past, and if you have, go with whatever setup you have working for you...