Giter VIP home page Giter VIP logo

atshakil / react-native-scaffold Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 703 KB

A React Native scaffold with Redux, React Navigation and i18n support

License: MIT License

JavaScript 52.29% Python 10.68% Java 9.85% Objective-C 27.18%
react-native react redux react-navigation i18n react-native-vector-icons eslint boilerplate starter-template starter-project boilerplate-application javascript es6 jsx

react-native-scaffold's Introduction

React Native Scaffold

A React Native scaffod featuring Redux and React Navigation

Features

NPM Scripts

  • npm start - Starts JS server
  • npm run lint - Runs the ESLint linter
  • npm run test - Invokes Jest test runner

Installation

Prerequisites

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 Support
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
iOS

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.

Development

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

Production

Android

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.

iOS

TODO

License

MIT

react-native-scaffold's People

Contributors

atshakil avatar

Stargazers

 avatar

Watchers

 avatar

react-native-scaffold's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.