-
Notifications
You must be signed in to change notification settings - Fork 7
Dev ‐ Mobile Updates
Spencer Spenst edited this page Jan 7, 2024
·
16 revisions
Here is a reference PR: https://github.com/sspenst/pathology/pull/1014
- Make changes to
App.tsx
- Update expo packages with
npx expo install --fix
: https://docs.expo.dev/workflow/upgrading-expo-sdk-walkthrough/ - Increment version and build numbers
app.json
(version
,buildNumber
,versionCode
) - Run
npx expo prebuild
to propagate these changes (https://docs.expo.dev/more/expo-cli/)-
/android
and/ios
folders can be deleted and recreated from scratch with this command - This may be necessary to reset your local dev environment or if there are major changes to app.json (eg title change)
- If necessary, follow the steps here to setup Notifee: https://notifee.app/react-native/docs/ios/remote-notification-support
-
- Add back the following lines to
Info.plist
since they get removed by prebuild:
<key>EXDefaultScreenOrientationMask</key>
<string>UIInterfaceOrientationMaskAllButUpsideDown</string>
-
npx expo run:ios
to test iOS changes locally- If there are issues building, try removing
build/*
andPods/*
from/ios
, and runpod install
in/ios
- If there are issues building, try removing
-
npx expo run:android
to test Android changes locally- Make sure
java -version
matches Gradle build version- Check
gradle-wrapper.properties
for Gradle version and find the applicable Java version - Then set the correct version with
export JAVA_HOME=`/usr/libexec/java_home -v 18.0`
- Check
- To fix
Could not read /Users/sspenst/Documents/pathology/pathology-react-native/node_modules/expo-modules-core/android/build/downloads/boost_1_76_0.tar.gz
:- Download boost from here: https://source.ipfire.org/source-2.x/boost_1_76_0.tar.gz
- Replace the file at that folder since it is not in GZIP format
- Make sure
- If all is working, create builds with EAS (https://docs.expo.dev/build/setup/)
- NOTE: comment out
google-services.json
andGoogleService-Info.plist
from.gitignore
as these files are required during the build - For Android, download the
.aab
file and submit manually on the Google Play Console - For iOS, submit with
eas submit -p ios
- Verify with TestFlight and submit
- NOTE: comment out