Subscribe now

Generating a package for your device [12.29.2016]

At some point you will need to generate a package for your device. This is the installer that people will run.

  • APK for Android.
  • IPA for iOS.

When you use react-native run-ios or react-native run-android, it builds a debug package and installs it to the device. If you're using your iPhone or Android it will install the debug app in your device. So, you just need to plug in your phone and then you can deploy the application to an actual device. For iOS devices it works well every time. On some android devices, you might need to run an adb reverse, as outlined in this section of the React Native documentation.

So you're already building a package, whether you knew it or not. If you want to publish your app to the store, you need to handle a few more things

  • For Android, you will need to have a signed apk.
  • For iOS, you will need to have an app in the release schema.

React Native does it for you. Just use the command:

react-native run-ios --configuration Release

This will build the app in Release mode and you can test.

You can generate a Signed apk for your device] and send this apk to the play store.

There's a simpler way though. I like to use Buddybuild. We'll talk more about Buddybuild later; for now let's see how it can help us.

Buddybuild is a continuous integration, continuous deployment, and user feedback platform for iOS and Android development teams. It can run each build of your app as you're working on it, and generate an installable app. It can also help us publish to the stores. There's also an integration with the Play Store - we will see that later.

Let's check it out.

We're using buddybuild for the Dailydrip app, here you can see the list of commits and consequently the list of builds. If we click in a build, we can see the release and the debug app. You just need to share this link with someone and then the person will be able to download the app. There is also an integration with play store we will see that later.

Otherwise, the react native documentation is pretty good for this, you can see the links in the resources.

Resources