A starter project for React Native apps
React Native requires Yarn, Node (8.3+), Watchman, JDK (8+), the React Native CLI, Cocoapods, and Xcode. Run the following commands for any packages you don't already have:
brew install yarn
brew install node
brew install watchman
brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8
sudo gem install cocoapods
npm install -g react-native-cli
Install Xcode through the App Store if you don't already have it.
Clone the repo by running:
git clone https://github.com/redolivedev/react-native-starter.git [your project name]
Once the repo has cloned, you need to change the project name and install the android & ios projects. Do the following:
- Open package.json and change the "name" property to your project name.
- Open app.json and change both the "name" and "displayName" properties to your project name.
- Run the following commands:
cd [your project name]
npm i
react-native upgrade --legacy true
If it asks to replace any files, just enter n for no.
Now you need to install iOS pods. Run the following commands:
cd ios && pod install
cd ../
You should be able to run the app now. Run the following command:
react-native run-ios
It may take a moment to start the first time.