The main codebase for the Tinytown React Native app.
- Set up React Native environment: https://reactnative.dev/docs/environment-setup
- Clone this repo
git clone https://github.com/Tinytown/tinytown-react-app.git
- Install Yarn
brew install yarn
- From root directory, issue:
yarn install
For iOS
- Go into the iOS folder:
cd ios
- Install appropriate pods:
pod install
- Download GoogleService-Info.plist from Firebase console and place in the directory tinytown relative to current location.
- Move out of current directory:
cd ../
- Run the iOS simulator:
yarn react-native run-ios
For Android
- Download google-services.json from Firebase console and place it in the directory android/app relative to repository's root directory.
- Open a new tab in your terminal and run your Android emulator from any location. For instance:
emulator -avd Pixel_3_API_28
- In original tab, from the root of repository, run
yarn react-native run-android
Credentials
- Create a new
.env
file in the root directory - Add the following lines to incorporate API-related credentials
MAPBOX_ACCESS_TOKEN=<MAPBOX_ACCESS_TOKEN_VALUE>
TWITTER_CONSUMER_SECRET=<TWITTER_CONSUMER_SECRET_VALUE>
- Ping the #vault channel in Discord to get the keys
EMFILE: too many open files
Caught by @keedyc
Platform: Android
Solution: Run these commands from root directory
brew update
brew install watchman
More info: facebook/create-react-app#4540 (comment)
fatal error: module map file '/.../YogaKit/YogaKit.modulemap' not found
Caught by @alfalcon90
Platform: iOS
Solution: Open the /ios/tinytown.xcworkspace file instead of the .xcodeproj one.
More info: facebook/react-native#28503