Skip to content

Commit

Permalink
Update README (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbouslog authored Sep 20, 2022
1 parent 450c580 commit 7ac9404
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,36 @@ More detailed information on the [wiki](https://github.com/zooniverse/mobile/wik
The Zooniverse Mobile app is a [React Native](https://facebook.github.io/react-native/) app that allows folks like you and me to contribute to astronomy, ecology, and anthropology research from their couch, bathtub, or bus stop (but don't swipe and drive, please).

## Setting Up for Local Development
Setting up to work on a react-native app is a little tricky, and setting up to work on this one in particular is trickier. The guide below attempts to be comprehensive. If you run into any further issues while attempting to get set up, please reach out to Chelsea Troy (chelsea@zooniverse.org)
Setting up to work on a react-native app is a little tricky, and setting up to work on this one in particular is trickier. The guide below attempts to be comprehensive. If you run into any further issues while attempting to get set up, please reach out to contact@zooniverse.org.

### Preparing The React Native Framework
#### Requirements:
- Node >= 6.9.0
- Node >= 10
- React Native CLI (`npm install -g react-native-cli` - may need sudo/admin depending on your setup)
#### Steps:
1. Follow the instructions for Android and iOS setup in [this guide](https://facebook.github.io/react-native/docs/getting-started.html).
1. Clone down this repo and navigate to its directory (called `mobile`).
1. Run `npm install` (later, if you need to reinstall dependencies for some reason, you can run `rm -rf node_modules/ && npm install`)
1. Run `npm start`.

### Setting up to run on iOS
1. Follow the instructions for Android and iOS setup in [this guide](https://reactnative.dev/docs/0.62/environment-setup).
2. Clone down this repo and navigate to its directory (called `mobile`).
3. Run `npm install` (later, if you need to reinstall dependencies for some reason, you can run `rm -rf node_modules/ && npm install`)
4. Run `npm start`.
#### Troubleshooting:
- [Troubleshooting wiki](https://github.com/zooniverse/mobile/wiki/Troubleshooting) for additional help

### iOS
#### Requirements:
- XCode 10.1 or 10.2
- XCode
- An iPhone X Simulator, which you can run from XCode.
#### Steps:
On the command line, from the `mobile` directory, run:
1. `cd ios && rm -rf Podfile.lock && pod install && cd ..`. You may need to `brew install cocoapods` first.
2. `react-native run-ios`

#### iOS Build Troubleshooting:
- You _may_ need to manually link up the `react-native-svg` dependency. Open XCode, and in XCode open `mobile/ios/ZooniverseMobile.xcworkspace`. Follow [these instructions](http://facebook.github.io/react-native/docs/linking-libraries-ios.html#manual-linking) to manually link `RNSVG.xcodeproj`, found at `mobile/node_modules/react-native-svg/ios/RNSVG.xcodeproj`. For our app, you _do_ need to do step 3 in that tutorial, adding `$(SRCROOT)/../node_modules/react-native-svg/ios/RNSVG` to our Header Search Paths for both debug and release at Build Settings > Header Search Paths.
- Switch the project to the XCode Legacy Build System as described [here](https://github.com/facebook/react-native/issues/19573) under the section named **"Opting out of the new Xcode build system."**

**Note**: There is a bug in Xcode 8 with react-native's RCTWebSocket. If you receive an error, follow the instructions here:
http://stackoverflow.com/questions/38710654/rctwebsocket-ignoring-return-value-of-function-declared-with-warn-unused-resul

### Android
#### Requirements:
- Android Studio (these instructions developed with AS 3.6.3)
- Android Studio
- You'll need at least one emulator. To get one:
* Within Android Studio, open the "AVD Manager" - in the toolbar click the icon with the purple device and small android (fourth from the right)
* Click 'Create Virtual Device' - bottom left-hand corner
* Create at least one using the latest Android Release (Nougat). I have a few different size and Android Release configurations
* Create at least one using the latest Android Release. I have a few different size and Android Release configurations
- Also you'll need a Gradle properties file outside the project for keeping secrets that aren't checked into source control. This should be in ~/.gradle/gradle.properties and contain the following:
```
MYAPP_RELEASE_STORE_FILE=/path/to/your/keystore.jks
Expand All @@ -54,8 +49,6 @@ You will have to get the key _itself_ from an existing maintainer. We are lookin
- If Android studio prompts you to update Gradle files, you should do it.
- The command `react-native run-android` will install the build, but fail in launching the app due to a bug with the `react-native` script with having a seperate `applicationId` for development builds.

[![pullreminders](https://pullreminders.com/badge.svg)](https://pullreminders.com?ref=badge)

## If you Work for The Zooniverse

You may also want to set up error reporting from your local copy of the application to our reporting service, Sentry. [Here are instructions on how to do that!](https://github.com/zooniverse/mobile/wiki/Enabling-Sentry-for-your-Local-Builds)

0 comments on commit 7ac9404

Please sign in to comment.