Skip to content

GalushkoVasiliy/react-native-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TO START PROJECT

  1. Clone the repo
  2. Go to project folder
  3. Run from console
  yarn
  cd ios
  pod install
  cd ../
  1. To run android:
  react-native run-android
  1. To run ios: open *.xcworkspace in Xcode, choose simulator device and press run button in the left part of the top bar

react-native ver: 0.59.9

HOW TO FIX ISSUE WITH config.h or THIRD PARTY

STEPS

FIRST OF ALL - Try to set Build System TO Legacy Build System. To do this - open:

  1. XCode -> File -> (Project Settings or Workspace Settings)

  2. And choose Legacy Build System in Build System dropdown;

  3. After this - re-install node_modules;

If this wasn't helpful - try next steps:

  1. rm -r ~/.rncache
  2. rm -rf node_modules
  3. yarn
  4. react-native run-ios --scheme "dev"
  5. cd node_modules/react-native/third-party/glog{version number} && sh ./configure
  6. clear Derived Data in Xcode
  7. Run build in Xcode

RUN & ASSEMBLE

Environment setup based on tutorial from:

https://github.com/S-PRO/react-native-env-setup

WARNING!

  • Please - use only "dev" scheme/productFlavor for development! "stage"/"preproduction"/"production" are going to be used while QA/Production
  • On iOS platform only "dev" scheme is debuggable, "stage"/"preproduction"/"production" are signed via release configs

How to run:

Android:

WARNING!

  • No install 10 JDK or higher.
  • No pure react-native run-android usage. For development - please use commands below;
  • No pure cd android && ./gradlew assembleRelease usage. For development - please use commands below;

Running on simulator/real device in debug mode:

  1. yarn run android:run-dev - dev version (uses config from .env.dev);
  2. yarn run android:run-stage - stage version (uses config from .env.stage);
  3. yarn run android:run-preproduction - preproduction version (uses config from .env.preproduction);
  4. yarn run android:run-production - production version (uses config from .env.production);
NOTE: After build was successfully assembled - it can show next error:

Starting: Intent { cmp=com.app/.MainActivity } Error type 3 Error: Activity class {com.app/com.app.MainActivity} does not exist.

That is ok. Just press on application icon on your simulator/device and everything will work;

Assembling build (release mode):

  1. yarn run android:build-dev - dev version (uses config from .env.dev);
  2. yarn run android:build-stage - stage version (uses config from .env.stage);
  3. yarn run android:build-preproduction - preproduction version (uses config from .env.preproduction);
  4. yarn run android:build-production - production version (uses config from .env.production);

iOS:

WARNING!

  • No pure react-native run-ios usage. For development - please use Xcode;
  • Please, use xcworkspace file, not xcproject.

Running on simulator/real device:

  1. Choose scheme;
  2. Run on simulator/device;

Assembling build (release mode):

  1. Choose scheme;
  2. Run "Product/Archive";

CHANGE DEFAULT BUNDLE ID:

Run shell script from terminal

sh ./change_bundle_id.sh ${old_bundle_id} ${new_bundle_id}

old_bundle_id is com.starter here;

MODULES CONFIGURING

react-native-document-picker

Please, follow instructions described here https://github.com/Elyx0/react-native-document-picker. This is required for correct iOS setup.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published