Create an IPA and APK From a React Native Project

An easy step-by-step guide

XOR
Better Programming

Photo by Ricardo Rocha on Unsplash

This tutorial will guide you on how to create IPA and APK from a React Native project. Let's dive in.

First, create a React Native app with this CLI.

react-native init MyApp --package=com.MyApp.MyApp// or in newer version of CLInpx react-native init MyApp 

Now the created app is very simple—like this.

Now, let's build IPA and APK of myApp project.

Let's check for iOS first.

iOS

Step 1

Open iOS project with Xcode using the following simple command from your root folder.

xed ./ios

Step 2

Now paste the following command in terminal

react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Responses (9)

What are your thoughts?

react-native run-android — variant=release
or
cd android && gradlew assembleRelease
is enough to build the apk.

--

Hi
Really Nice article!
Tried above steps to build iOS build and it works fine, but when tried to open project in Xcode, its showing all library files are missing. Followed all steps as shown above. It works fine for Android though. what can be the issue?

--

Hi
After doing this and i am trying run the application from ‘react-native run-ios’ but it is throwing an error ‘No bundle URL present. Make sure you’re running a packager server or have included a .jsbundle file in your application bundle
can you please help me here.
Thanks in advance.

--