You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/mobile/README.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,11 +51,11 @@ npm run start:devtool
51
51
52
52
You should now see the mobile app on your phone.
53
53
54
-
This setup will point at your local version of the React Native app, but it will point at the staging web app and backend. You probably want to follow the instructions on local dev below to run the full stack locally.
54
+
This setup will point at your local version of the React Native app with the staging web app and backend. If you change any code within the web or backend folders, you will need to run the full stack locally to see your changes. Follow the instructions on local dev below.
55
55
56
56
## 2. Full local development setup
57
57
58
-
To actually do full local development, you will want to run the entire stack on your dev machine, and point the dev tool at that instead of the staging environment.
58
+
To run the mobile, frontend and backend environments fully locally, you need to run the entire stack on your dev machine, and point the dev tool at that instead of the staging environment.
59
59
60
60
First, run the following script which patches environment variables to point the app at your local running versions of the frontend and backend. It auto-detects your IP and updates all config files at once:
61
61
@@ -69,12 +69,13 @@ Now run everything from the repo root, each in a separate terminal:
69
69
70
70
```bash
71
71
# Terminal 1: backend (requires Docker)
72
+
72
73
docker compose up --build
73
74
74
75
# Terminal 2: web frontend
75
76
cd app/web && yarn install && yarn start
76
77
77
-
# Terminal 3: Expo
78
+
# Terminal 3: Expo (Mobile)
78
79
cd app/mobile && npm run start:devtool
79
80
```
80
81
@@ -180,7 +181,9 @@ All release builds (Dev Tool, Stage, Prod) are done in CI ([`app/.gitlab-ci.yml`
180
181
181
182
Releasing to users is then a manual process:
182
183
183
-
**Staging** builds are for internal testing and are available as soon as CI submits them (TestFlight after Apple's automated processing; Play internal testing immediately). Optionally add release notes in [App Store Connect](https://appstoreconnect.apple.com) (Couchers (Staging) → TestFlight → build → "What to Test") or the [Google Play Console](https://play.google.com/console) (Couchers (Staging) → Testing → Internal testing → release notes).
184
+
**Staging** builds are for internal testing and are available as soon as CI submits them (TestFlight after Apple's automated processing; Play internal testing immediately). Ideally add release notes in [App Store Connect](https://appstoreconnect.apple.com) (Couchers (Staging) → TestFlight → build → "What to Test") or the [Google Play Console](https://play.google.com/console) (Couchers (Staging) → Testing → Internal testing → release notes) so testers know what to look for.
185
+
186
+
Update `RELEASE_NOTES.md` as you code to keep track of changes then copy/paste this after building.
184
187
185
188
**Production** releases should be coordinated with the team, after the changes have been tested in staging:
Copy file name to clipboardExpand all lines: docs/native-dev-tool.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Couchers Dev Tool
2
2
3
-
The Couchers Dev Tool is a simple app that uses the Expo development client, along with OTA updates, to allow devs and non-devs to easily develop and QA the native app.
3
+
The Couchers Dev Tool is a simple app that uses the Expo development client, along with OTA (over-the-air) updates, to allow devs and non-devs to easily develop and QA the native app.
4
4
5
5
It supports:
6
6
@@ -14,7 +14,7 @@ The point is that you only need to do full builds if you're changing native modu
14
14
***iOS**: via TestFlight, ask a native dev lead to be added.
15
15
***Android**: download the APK from [the dev tool builds page](https://develop--devtool-builds.preview.couchershq.org/).
16
16
17
-
It's a dev build, so we can't distribute it through the app stores proper. The Dev Tool coexists with the staging and production apps on the same device (it has its own bundle ID), and points at the staging backend by default.
17
+
It's a dev build, so we can't distribute it through the app stores proper. The Dev Tool coexists with the staging and production apps on the same device (it has its own bundle ID), and points at the staging frontend (web) and backend by default.
Copy file name to clipboardExpand all lines: docs/native-ota-updates.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ When fingerprints change, we must publish a new version via app stores, and user
42
42
43
43
### On the client
44
44
45
-
I keep saying OTA updates give us "flexibility", but not full control.
45
+
OTA updates give us "flexibility", but not full control.
46
46
47
47
In order to update the app, the app needs to download a signed bundle of Hermes compiled JavaScript code. It then needs to **restart the app** in order to apply that code update. In practice you want to always apply a new code bundle at startup, not interrupt a session. You could feasibly download the bundle on app load, then apply it immediately. The Expo default will try to download bundles in the background, then apply them the next moment the user puts the app away and/or restarts it in the foreground.
48
48
@@ -54,11 +54,11 @@ In order to find out about a new update, Expo uses the "Expo Updates Protocol v1
54
54
55
55
Our backend serves the update protocol in `Bugs.GetNativeUpdateManifest`, which the client loads from `https://api.couchers.org/native/ota/manifest`. This endpoint decides which update to serve, depending on various logic.
56
56
57
-
The backend generally picks the newest non-banned OTA update for the combination of platform and fingerprint available from teh database, then serves pre-signed manifest bytes that are fetched from the CDN. (Banning is a mechanism to quickly stop us from distributing botched updates.)
57
+
The backend generally picks the newest non-banned OTA update for the combination of platform and fingerprint available from the database, then serves pre-signed manifest bytes that are fetched from the CDN. (Banning is a mechanism to quickly stop us from distributing botched updates.)
58
58
59
59
### Publishing new updates
60
60
61
-
The publishing flow involes basically taking a full Expo bundle (generated via `ota-bundle.mjs`), stamping it with a new publish timestamp, signing it, producing a manifest file, and telling the backend about it.
61
+
The publishing flow involves taking a full Expo bundle (generated via `ota-bundle.mjs`), stamping it with a new publish timestamp, signing it, producing a manifest file, and telling the backend about it.
62
62
63
63
You can see how this works by tracing the staging OTA update flow (from `.gitlab-ci.yml`), where we build a new update on every push to `develop`. For prod the flow is the same, but we have a magic button in a magic place to trigger it.
0 commit comments