npm install
To run app on connected device or simulator:
npm start
npm run react-native run-android
npm run react-native run-ios
See https://facebook.github.io/react-native/docs/0.49/signed-apk-android.html for creating andoid release.
In order to deploy to app store is preferrable to create a bundled file that runs on the phone without external dependencies. In the root directory, type:
./node_modules/.bin/react-native bundle --platform ios --dev false --entry-file index.ios.js --bundle-output ios/main.jsbundle
After a successful output, you are good to modify the file placed at ios/CuriousEdinburgh/AppDelegate.m following:
- Commenting out the line
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
- Adding the following line:
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
which tells Xcode that the app has to run from the main.jsbundle file generated