Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build React Native iOS app, get an .app file and deploy to device?

Tags:

I'm going by this information: https://facebook.github.io/react-native/docs/running-on-device-ios.html#content

I did the react-native bundle command, changed AppDelegate.m, and I can build with success. Though I'm not sure where it's putting the final build. Where is it putting the .app file, and when I want to copy that .app file to my phone, should I sync it via iTunes, or is there a quicker way?

Basically I'm just trying to create and deploy a standalone app that doesn't need the React packager server.

like image 457
ffxsam Avatar asked Jan 21 '16 20:01

ffxsam


People also ask

Can I build iOS app using React Native?

With React Native, developers can write real, natively rendering mobile applications for iOS and Android. It helps build apps on two platforms at once, while maintaining the look, feel, and productivity of an app built on the specific iOS or Android platform.


1 Answers

I don't know if it is possible to sideload a built app into a phone via iTunes - but if it is possible, the steps to to achieve it would be the same as if you were to deploy a regular iOS app in the same way.

Typically you would deploy a standalone app to a device using TestFlight, via the regular app store submission process:

  1. Log into Apple Developer Member Center with the Apple ID tied to your developer account (or register for a new developer account)
  2. Generate provisioning profiles for Ad-Hoc deployment and App Store deployment
  3. Download and install the provisioning profiles by double clicking them in OSX finder.
  4. Package javascript bundle with react-native bundle
  5. In Xcode project properties select your App Store distribution profile under the Build Settings tab. Bump Version and Build numbers under the General tab.
  6. In the top of the screen, select your production build scheme, and Generic iOS Device (or any plugged in iDevice) as build target.
  7. Run Product > Archive
  8. Open Window > Organizer, choose your build and press Upload to App Store...
  9. Log in to iTunes Connect with your developer account, and under TestFlight tab click Select Version to Test (it might take a while for your new build be be available for testing).
  10. Wait for Apple to approve your app for testing (Internal Testing apps should be quick, External Testing apps need to go through a lightweight approval process).
  11. Once app is approved for TestFlight testing, copy the link to your test app and follow the given instructions.

If this seems like a lot of hassle - it is. But going through this process is worth it, as it is the prerequisite to be able to submit the app for download in the App Store, and the sooner get this process in place, the easier it will be to release the app to the public.

like image 156
jevakallio Avatar answered Oct 19 '22 05:10

jevakallio