Heads up... You're reading this book for free, with parts of this chapter shown beyond this point astext.
You can unlock the rest of this book, and our entire catalogue of books and videos, with a raywenderlich.com Professional subscription.
After working through all the sections in this book, you now have four Mac apps. Each one is a different style of app, and each has a different purpose.
The next step in your journey to becoming a Mac developer is distributing your apps.
The App Store is the only distribution option for iOS apps, but macOS apps can use both the Mac App Store and external distribution.
In this section, you’ll look at both these possibilities. This chapter discusses the options and then covers using the Mac App Store for testing and release.
What are the advantages and disadvantages of using the App Store?
First the advantages:
Apple handles everything. They serve the apps, they handle payments and refunds, they provide a review and rating mechanism, and they provide crash reports.
Users feel more secure about downloading apps from the App Store and are less reluctant to provide payment details.
You can open your apps for beta testing using TestFlight. Apple handles the distribution, feedback mechanisms and expiration dates automatically.
It’s easy to release updates to your app’s users. You upload a new version and the App Store app installs it.
And now for some disadvantages:
You’re at the mercy of the app review system. The reviewers pass most apps without problem or with minor modifications. But this isn’t always the case.
Apple takes a cut of your sales: either 30% or 15%, depending on whether you’re in the small business program.
Your app must be sandboxed. For most apps this is not a problem, but for an app like ImageSipper, this rules out the App Store.
Apple doesn’t support update pricing or free trials. You can fake a trial by making the app free and having an in-app purchase to unlock it, but this is messy. Apple has no provision for upgrade pricing. If you release a major revision and you want your existing users to pay, you have to create an entirely new app in the App Store. And then, there’s no way to give those existing users a discount.
You may wonder why I haven’t included the cost of the Apple Developer program as a disadvantage. As you’ll see in the next chapter, Apple is gradually making this a necessity regardless of your distribution method.
One nice thing is that you don’t have to pick one method or the other. You’re free to distribute your app through the App Store and externally at the same time.
But for the rest of this chapter, you’re going to walk through the process of testing and distributing via the Mac App Store. If you’re familiar with this from working with iOS apps, or if you’ve decided not to use the Mac App Store, then you can skip ahead to the next chapter.
Setting up your Developer Account
Apple has two sites that you’ll use. Apple Developer is where you’ll manage your membership, download beta software, read the forums and so on. And App Store Connect is where you’ll configure your apps, sign agreements, handle payments and perform other tasks related to distributing and supporting your app.
Identifying Your App
Each app must have a unique identifier in the App Store. You set this using the Bundle Identifier. It identifies your app forever and can never change once you’ve created the app in App Store Connect.
Apple uses code signing as a way to verify your app. When you upload your app to Apple, their servers analyze it, match it to your developer identity and attach a digital signature. If any malware changes the app’s code, the signature won’t match and macOS won’t run it.
Uploading Your App
Now, it’s time to make Xcode earn its keep. This next stage used to be very convoluted and tedious, but modern versions of Xcode do a lot of the work for you.
Configuring the App
Log in to App Store Connect and click My Apps. Find your new app, which should be the first one in the list, and click the icon or name to select it:
You may have noticed that apps in the App Stores now display their privacy settings and list how much of your data they gather. Select App Privacy in the sidebar and then click Get Started to fill this in. If your app collects any data, you’ll have to provide details.
Apple has only recently opened TestFlight to macOS apps although it has been available for iOS apps for some years. TestFlight is a system that allows you to distribute pre-release versions of your app using the TestFlight app. You can have a closed test where you invite specific people to try your app, and you can have an open beta where up to 10,000 users can test it.
After Apple has processed your app, you’ll see a warning symbol marked Missing Compliance. Because Apple distributes your app from the USA, it’s subject to US export laws, and you must report if your app uses any form of encryption.
After you click Start Internal Testing, you’ll be back in the TestFlight tab for your app, but this time it’s listed as Ready to Submit. Before opening the app to external testers, Apple has to review it, but you can get it out to internal testers right away.
New Test Versions
As you receive feedback, you’ll want to update the app and release new test versions. In Xcode, make your edits and then change the build but leave the version as it is. Archive the app and use the Organizer to Distribute the App as before.
Internal testing is for people in your organization, and you can invite up to 100 testers. External testing lets you open your app to many more testers. You invite specific people by email and you can publish a link to allow anyone to join your test program.
Releasing Your App
By going through the TestFlight process, you’ve done most of the work already.
Checking your Crash Logs
macOS users, like iOS users, have the option of allowing their systems to share crash reports and diagnostics with developers.
Updating the App
After your app has been available for a while, you’ll want to release a new version. Make your changes in Xcode, update the version and build details, create a new archive and upload to App Store Connect as before.
- The App Store provides a non-exclusive mechanism for distributing your macOS apps.
- You need an Apple ID with two-factor authentication and an Apple Developer account connected to Xcode.
- Xcode does a lot of the hard work of generating certificates, app identifiers and app records.
- TestFlight allows you to get feedback and bug reports for pre-release versions.
- Your app must pass app review before you can open it for external testing and again before you can release it on the App Store.
- You upload updates in the same way as new apps and Apple releases them to your users automatically.
Where to Go From Here?
If you need further information on any aspect of distributing your app through Apple, App Store Connect Help is very comprehensive.