Skip to content

binitvermani/react_native_sample_code

Repository files navigation

react_native_sample_code

Sample Code for ReactNative

Key features:

Installation Steps

  1. Clone the repo
git clone https://github.com/binitvermani/sample-app-react-native.git
  1. Install node_modules

if using yarn:

yarn install

if using npm:

npm install
  1. Install pods (if running on MacOS)

An automation script runPostInstallUninstallTasks is added into the project which will run after every npm dependency install or uninstall. Using this, the step 2 will automatically install the pods for iOS if you are using the MacOS. For some reason, if the step 2 will fail to install the pods, then you can mannually install the pods using:

cd ios && pod install
  1. Create ENV files

Hit the following commands in the terminal to create the .env files for the respective environment. .env.staging and .env.production are added into the .gitignore file and will not be pushed to the version control system.

echo ENV_TYPE=staging > .env.staging
echo ENV_TYPE=production > .env.production

Running the app

This app is configured for the custom staging and production environments. So, the standard npm run android or npm run ios commands will not work on this project.

  • To run Android Staging Debug: yarn androidStagingDebug or npm run androidStagingDebug
  • To run iOS Staging Debug: yarn iosStagingDebug or npm run iosStagingDebug
  • To run Android Production Debug: yarn androidStagingDebug or npm run androidProductionDebug
  • To run iOS Production Debug: yarn androidStagingDebug or npm run iosProductionDebug

About

Sample Code for ReactNative

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published