Video: Building for Production
Level 2 React Native
Released: null
-
1. Introduction
2M9S
-
2. Project Setup
6M52S
-
3. React Native Debugging Menu
5M17S
-
4. Simple Scrolling List & Layout with Flexbox
16M1S
-
5. Capturing User Taps
6M
-
6. Platform Specific Styling
9M55S
-
7. Efficient Lists: Rendering Items with FlatList
4M35S
-
8. Capture User Input with TextInput
13M31S
-
9. Save User Input in State with useState
2M59S
-
10. Installing JavaScript and Native Dependencies
5M38S
-
11. Swipe Gestures for List Items
11M42S
-
12. Add and Remove Items from the List
2M23S
-
13. Persisting Lists Between Sessions with AsyncStorage
6M52S
-
14. Refactor: Custom Hook
5M3S
-
15. React Navigation: Stack Navigation
11M32S
-
16. React Navigation: Tab Navigation
12M16S
-
17. Storing Items in Cart
7M15S
-
18. Rendering Groups of Data with Section List
6M47S
-
19. iOS App Icon and Splash Screen
6M23S
-
20. Android App Icon and Splash Screen
11M39S
-
21. Building for Production
1M53S
Building for Production
iOS
First, ensure you've set up an Apple developer account.
To test a production version of your application, in Xcode, go to Product → Scheme → Edit Scheme. Select the "Run" tab and change the "Build Configuration" to "Release". Build the app as you would normally to test the app in production mode. Note: Make sure to switch this back to re-enable live reloading/development tools.
To build for production, in Xcode, select Product → Build and follow the prompts Xcode gives you to upload it to App Store Connect.
Full iOS Docs: https://facebook.github.io/react-native/docs/running-on-device#building-your-app-for-production
Android
First, ensure you've set up a Google Play Developer Account.
Next, you need to sign your application. The key you're about to create is the key to your app once it's published. If you lose this key or forget any of the associated passwords you will not be able to update your app!
To generate they key fun the following command.
Note: You can change my-release-key.keystore
and my-key-alias
to whatever you want, just make sure to not the name.
TODO
Place the resulting .keystore file in the android/app
directory of your project.
Next edit either ~/.gradle/gradle.properties
or android/gradle.properties
(note that these files are outside of your project at the root of your machine) and add the following.
TODO
Change MY_APP
to something related to the app you're working on (such as the project name). The values should align with those you set when creating the keystore file.
Next, you need to configure the android app to use those values when signing the application with your keystore file. In android/app/build.gradle
add the following:
TODO
Make sure to use the variable names that align with what you set previously.
Finally, you can generate the release build:
TODO
The final, signed, production build will then exist at android/app/build/outputs/apk/release/app-release.apk
. To test it first uninstall the existing app from your target device and then run react-native run-android --variant=release
.
To publish the app you'll upload the app-release.apk
to the Google Play console.
Full Android Docs: https://facebook.github.io/react-native/docs/signed-apk-android