- CocoaPods: https://guides.cocoapods.org/using/getting-started.html#installation
- Node: https://github.com/nvm-sh/nvm#install-script
- React Native Environment: https://reactnative.dev/docs/getting-started
- Ruby (for Fastlane): https://rvm.io/rvm/install
- Yarn: https://classic.yarnpkg.com/en/docs/install/#alternatives-tab
- Detox-cli: https://github.com/wix/Detox/blob/master/docs/Introduction.GettingStarted.md#install-detox-command-line-tools-detox-cli
This codebase is meant to be used to kickoff react native projects. The following optional features can be added out of the box to the new projects:
- Login and SignUp
- Onboarding
- Tabs
- Drawer
- Social Login Buttons
- Google Maps
- Firebase Crashlytics, Analytics and Performance
- Firebase Push Notification
You can exclude Android or iOS platform setup and dependencies instalation. Keep in mind that the project will be created for both platforms anyway, but the excluded will not compile. After prject generation, you can remove the excluded platform project folder if you want.
The boilerplate includes
- Analytics Tracking
- Basic constants
- Basic utils
- Detox configuration
- Font customization
- Http client configuration
- i18next configuration
- Push Notifications configuration
- React Navigation: Routes configuration
- Reactotron configuration
- Redux store intialization
- Recoil intialization
- Splash Screen
- TypeScript basic interfaces
- TypeScript configuration
- Apisauce
- Cerealizr
- Google Maps
- i18next
- React Hook Form
- React Native Config
- React Native Firebase
- React Native Paper
- React Native Push Notifications
- React Native Swiper
- React Navigation
- Recoil
- Redux
- Social Login
For kick off your own project using the template generator script you'll need to follow these steps:
- Run
yarn install
. - run
yo rootPath/generators/app/index.js
you'll need Yeoman installed for this. Also, the argument-v
can be used for logging. - Some prompts will pop up on your terminal. Pick whatever configuration works best for your current proyect.
- After the script is finished, your project folder will be successfully generated with all the necessary yarn dependencies installed. Do
cd you/project/path
. - Start bundler using
yarn start
. - Run
npx react-native run-ios --scheme develop
oryarn ios
for iOS andnpx react-native run-android --variant=developDebug
oryarn android
for Android. Also check the provided scripts on package.json - Start working on your project!
React Native Bootstrapper include test using jest tools.
To run the test just call yarn jest
on root folder.
Test includes:
- A selection of feature combination cases
- App creation check for each case
- App build check (after create) for each case
- App jest execution inside each created project for each case
- App Detox (e2e) execution inside each created project
Testing generator is really expensive so run all tests maybe can take a long time and consume CPU resources.
Some tests are defined to run concurrently at the same time in order to reduce the run time, for example, generate projects or run self-project tests. By default, jest use 5 nodes to run those test concurrently. If you are facing performance issues, you can set another lower value to set the nodes amount using the --maxConcurrency=<num>
parameter.
Example:
yarn test --maxConcurrency=2
By default, 'ios' platform is excluded from testing. By the way, you can tell jest program to run on both, android or iOS platform with the following argument param
yarn test -u -skip="android"
Skip options: "android" | "ios" | "none" Where 'none' will no skip and generate/test on both platforms.
For Detox execution, an existing simulator device is needed. By default, the name is Pixel_2_API_30
. If you want to run Detox test you maybe need to edit your android emulator name, create one with the pointed name or modify the avdName param over `generators