A React Native scaffod featuring Redux and React Navigation
- Redux
- React Navigation
- React Native i18n
- React Native FCM
- React Native Vector Icons
- ESLint
- Node HTTP Status
npm start
- Starts JS servernpm run lint
- Runs theESLint
linternpm run test
- Invokes Jest test runner
This project depends on Node.js and react-native-cli
. The Node.js
installation method varies from platform to platform.
If you are using a Debian distribution, please follow the steps below,
$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
$ sudo apt-get install -y nodejs
Or, if you are using some other linux distribution or a different platform, please follow the instruction provided here.
react-native-cli
module requires a global installation.
$ sudo npm install -g react-native-cli
Now, change CWD to project root and install dependency modules.
$ npm install
Create a gradle property file by renaming gradle.properties.example
as gradle.properties
(located in android/
)
FCM requires a configuration file (google-services.json
) to work. In order to
get the file, follow the steps bellow.
- Go to your project in https://console.firebase.google.com, or create one.
- Now, from project Settings > General > Your apps, use "Add APP" to add an android app to the project
google-services.json
will now be available for download
TODO
Once the FCM configuration file is added, app will start to receive notifications
without the necessity of taking any further step. But, if the app requires
advanced feature like Android click_action
, then some additional
configuration will be required.
For a more detailed configuration instruction, please visit the FCM module documentation.
Create a configuration file by copying application.json.example
as application.json
(located in app/config
)
Now, start the JS server.
$ react-native start
And, finally deploy the development app. to a device / emulator using,
$ react-native run-android
$ react-native run-ios
One way of logging is to use any of the following commands
$ react-native log-android
$ react-native log-ios
Create a keystore for the production app signing. You may update the available parameters (e.g. keystore name, alias, validity) to fit your requirement.
keytool -genkey -v -keystore primary-release-key.keystore -alias keystore_alias -keyalg RSA -keysize 2048 -validity 10000
Now copy the keystore file to android/app
directory.
In the global gradle.properties
file (located in android/
directory), update the STORE_PASSWORD
, KEY_PASSWORD
, KEY_ALIAS
and STORE_FILE
parameter with your keystore parameters.
Finally generate the release build using,
react-native run-android --flavor=release
which generates a release apk in android/app/build/outputs/apk
directory.
TODO
MIT