This is the React Native mobile app for the ONE local platform.
Note: Make sure you have completed the React Native - Environment Setup instructions till "Creating a new application" step, before proceeding.
npm installFollow the instructions to configure React Native Mapbox as described at https://rnmapbox.github.io/docs/install, both for iOS and Android. You will need a secret access token that will go in your home directory.
For development, run:
npm startIf you want to connect to the staging (beta) server, instead run npm run start:staging.
These commands run the entire iOS build and upload it to TestFlight. No other commands are needed in order to get a build to the testers.
There are two test servers: dev.onelocal.one and beta.onelocal.one and one production server. You can choose which you want to connect to.
Please note: running a build on Android or iOS makes updates to certain files. I typically don't push the updates into github because I don't really see the point, but YMMV.
npm run testflightor
npm run testflight:devYou can also generate builds which connect to the other servers with npm run testflight:beta,
npm run testflight:prod.
Because we changed to use a new App ID for Android, the one-button install doesn't work right now for Android.
- Manually update the version code in
android/app/build.gradle
...
versionCode 37
...
}
- Run the build as above, except use
playstoreinstead oftestflight. - On the Google Developer Console, create a new release and copy this file into the page:
android/app/build/outputs/bundle/release/app-release.abb.
Build hanging at the very beginning? Run npx react-native clean, also
creating a new Simulator. These are the two things that seemed to help me.
- "react-native-gesture-handler": "<2.21.0"
Because 2.21.0 requires RN 0.74.0+ https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/installation/
- "@tanstack/react-query": "<5.38.0"
In 5.39, a dependency was made for React 19, and 5.38 doesn't work for some reason.
This demonstrates that @rnx-kit/align-deps can't be trusted:
% npx @rnx-kit/align-deps --requirements react-native@0.73
error package.json: Found 1 violation(s) outside of capabilities.
In dependencies:
- react-native-gesture-handler "<2.21.0" should be "^2.14.0"
This project is licensed under the MIT License with a Commons Clause.
- Non-commercial use only: By default, the software may only be used for personal, educational, research, or community purposes,. Commercial use is prohibited without prior permission.
- Community Organizations: Specific nonprofit or community organizations may request permission to use the software for fundraising or other community initiatives. Contact [your email] for details.
- Commercial Use: Businesses or entities wishing to use this software commercially must obtain a separate commercial license. For inquiries, contact [your email].
For the full text of the license, see the LICENSE file.