Build and Publish a React Native App on the Mac App Store

Project Source Code

Get the project source code below, and follow along with the lesson material.

Download Project Source Code

To set up the project on your local machine, please follow the directions provided in the README.md file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.

This lesson preview is part of the Building React Native Apps for Mac course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.

This video is available to students only
Unlock This Course

Get unlimited access to Building React Native Apps for Mac, plus 70+ \newline books, guides and courses with the \newline Pro subscription.

Thumbnail for the \newline course Building React Native Apps for Mac

For the final lesson in this module, we're going to talk about releasing our app. Now, there are two possibilities to release your app. One is releasing it on your own, and the other possibility is releasing it on the App Store. If you're going to release the application on the App Store, there are a few details you should take care of. First of all, you want to enable the Sandbox. So on Xcode, I have selected the root object. I'm on the macOS target. And you want to go into Sign In and Capabilities. So here on the capabilities, you want to click on Add Capability, and you want to add the Apps and Box. So basically, it just creates a safe environment for the application, where no other app will be able to access its data or its process. And this is a requirement if you want to release it on the App Store. Since we are using HTTP request, we have to enable the outgoing connections capability. In any case, if you try to release your app on the App Store and you upload your app via the iTunes Connect application or via Xcode, Xcode will actually guide you whenever any of the properties is missing. Some of the errors might be a little bit more cryptic, but the process is fairly straightforward. Now, the other possibility is that you try to release your app on your own. This comes with a downside. Maybe you have seen it before, but sometimes when you have an on-sign app and you try to open it, you will get this type of dialog. That says macOS cannot verify this app is free from malware. Now, the problem is that Apple requires for you to have a developer account in order to sign your application. As long as you have not signed it, macOS will refuse to open it and the user has to take different steps to just enable or allow macOS to run your application. So it just creates this artificial barrier. It just creates friction for the user to open your app. Unfortunately, the only way to get around this is to pay Apple for the developer account. It costs $99 per year. It's not that much. It's fairly annoying, but it's their way of doing things. So once you have a developer account, what you want to do is here on Xcode again, the signing capabilities. You want to select the account you want to use for your application. And you want to give it a bundle identifier. You have to be fairly careful with this one because you won't be able to change it afterwards. So you want to use something that you can easily remember afterward. And you can just leave it as automatically managed signing if you are going to build your app within Xcode. Xcode is going to take care of all the signing process. If not, you can sign in manually, especially if you are building your app in some continuous integration system. This is what you will need to do. But it's a fairly complicated process. And it's not in the scope of this course. There's a lot of guides, but there's a lot of pitfalls as well. For you to sign your app, you have to generate certificates and profiles, etc. etc. So we're not going to worry too much about that. For now, we're just going to leave it as automatic signing. Now, before one of the lessons before when we were signing or when we were building our application, we already took a look into the architectures. Unfortunately, like we saw right now, things are not very smooth with the Apple Silicon compilation. But I expect things to get a little bit better as we move along. Great. So that finishes the basic portion of the macOS part of the course. This is the basic topics we cannot turn our app into a status bar application. We have dealt with the small details and interactions that you have to take care of when building a desktop application. But we haven't touched on the really cool, really advanced use cases for macOS. So on the next module, we'll be exploring the more advanced topics. But for now, you should be able to create a very basic app and release it into the App Store. So, looking forward and see you on the next module.