Skip to content

Commit 088a4de

Browse files
tmmampagent
andcommitted
docs(zbugs-swift): running the app on a device
The token and servers an app gets in its environment aren't saved, so on a device opened from the home screen it goes back to the saved ones: set Servers… and log in once. Amp-Thread-ID: https://ampcode.com/threads/T-01a1557f-dff8-761e-ad04-7fc6c1bd83db Co-authored-by: Amp <amp@ampcode.com>
1 parent 25962c5 commit 088a4de

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎apps/zbugs-swift/README.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ Log in from the account menu with the printed token, or through GitHub when
5151
the API server has `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` (it
5252
redirects back to `zbugs-swift://auth`). Servers… points the app elsewhere.
5353

54+
On an iPhone or an iPad, start the backend with `ZBUGS_HOST=0.0.0.0` so the
55+
device can reach it, and in the app set Servers… to this Mac's address on the
56+
network (for example `http://192.168.1.20:4848` and
57+
`http://192.168.1.20:5173`), then log in with the token. The app keeps both.
58+
A token and servers passed in its environment, as Xcode's scheme or the UI
59+
test passes them, last only for that launch: opened from the home screen, the
60+
app goes back to the saved ones.
61+
5462
## End-to-end tests
5563

5664
`BackendTests` runs the Swift queries and mutators against the backend: the

0 commit comments

Comments
 (0)