This project was bootstrapped with Create React Native App.
Below you'll find information about performing common tasks. The most recent version of this guide is available here.
README
Overview
Bowl Picks was created with Create React Native App. To get the app up and running locally you can either take the .APK file that exists in then base project directory, or you can download Node.js and Yarn and build it yourself. If you choose to build it yourself you can follow these steps or find more info below.
- Install Node.js and Yarn
- Clone the REPO and navigate to the BowlPicks folder
- Run
yarn install
and wait for that to finished - Run
yarn start
and the packager will start up - Download the Expo app on your android phone here
- Open it on the Expo app and scan the QR code the packager outputs
Note The app should work properly off of my Firebase account, the data in then
Firebase database is in the database.json
file in the repo.
Note If you want to run it in Android Studio run yarn eject
and then open the ./android/
directory in Android Studio
Using the app
Once you load up the app you will be prompted to sign in, once you sign in with a good enough password you will be redirected to pick the winners of the games, once you do that you will be then again redirected further to the leaderboard and it will validate your picks against the "winners"
Note The "winners" are all favorites at this time because the games haven't been played yet.
Everything below this line is defaulted from Create React Native App, use this if you can't get the app to run locally
Available Scripts
If Yarn was installed when the project was initialized, then dependencies will have been installed via Yarn, and you should probably use it to run these commands as well. Unlike dependency installation, command running syntax is identical for Yarn and NPM at the time of this writing.
npm start
Runs your app in development mode.
Open it in the Expo app on your phone to view it. It will reload if you save edits to your files, and you will see build errors and logs in the terminal.
Sometimes you may need to reset or clear the React Native packager's cache. To do so, you can pass the --reset-cache
flag to the start script:
npm start -- --reset-cache
# or
yarn start -- --reset-cache
npm test
Runs the jest test runner on your tests.
npm run ios
Like npm start
, but also attempts to open your app in the iOS Simulator if you're on a Mac and have it installed.
npm run android
Like npm start
, but also attempts to open your app on a connected Android device or emulator. Requires an installation of Android build tools (see React Native docs for detailed setup). We also recommend installing Genymotion as your Android emulator. Once you've finished setting up the native build environment, there are two options for making the right copy of adb
available to Create React Native App:
adb
Using Android Studio's - Make sure that you can run adb from your terminal.
- Open Genymotion and navigate to
Settings -> ADB
. Select “Use custom Android SDK tools” and update with your Android SDK directory.
adb
Using Genymotion's - Find Genymotion’s copy of adb. On macOS for example, this is normally
/Applications/Genymotion.app/Contents/MacOS/tools/
. - Add the Genymotion tools directory to your path (instructions for Mac, Linux, and Windows).
- Make sure that you can run adb from your terminal.
npm run eject
This will start the process of "ejecting" from Create React Native App's build scripts. You'll be asked a couple of questions about how you'd like to build your project.
Warning: Running eject is a permanent action (aside from whatever version control system you use). An ejected app will require you to have an Xcode and/or Android Studio environment set up.
Sharing and Deployment
Create React Native App does a lot of work to make app setup and development simple and straightforward, but it's very difficult to do the same for deploying to Apple's App Store or Google's Play Store without relying on a hosted service.
Publishing to Expo's React Native Community
Expo provides free hosting for the JS-only apps created by CRNA, allowing you to share your app through the Expo client app. This requires registration for an Expo account.
Install the exp
command-line tool, and run the publish command:
$ npm i -g exp
$ exp publish
Building an Expo "standalone" app
You can also use a service like Expo's standalone builds if you want to get an IPA/APK for distribution without having to build the native code yourself.
Ejecting from Create React Native App
If you want to build and deploy your app yourself, you'll need to eject from CRNA and use Xcode and Android Studio.
This is usually as simple as running npm run eject
in your project, which will walk you through the process. Make sure to install react-native-cli
and follow the native code getting started guide for React Native.