fix potential build problems (Claude recommendations)

This commit is contained in:
2026-09-14 13:06:19 -06:00
parent 97f4f59eff
commit 4bf2fc1009
6 changed files with 68 additions and 41 deletions
+16 -6
View File
@@ -128,19 +128,29 @@ Your Android device and computer **must be on the same Wi-Fi network** for the d
### Step 3: Configure API Endpoints
Create or edit `.env.development` with your computer's IP:
Pass your computer's IP to the build with `--api-ip`. The build script points
the claim and partner APIs at that address:
```bash
# .env.development - for physical device testing
VITE_DEFAULT_ENDORSER_API_SERVER=http://192.168.1.100:3000
VITE_DEFAULT_PARTNER_API_SERVER=http://192.168.1.100:3000
npm run build:android:dev -- --api-ip 192.168.1.100
```
**Important**: Replace `192.168.1.100` with your actual IP address.
Without `--api-ip`, a development build uses `10.0.2.2:3000`, which reaches the
host machine from an emulator but not from a physical device.
The build script applies `--api-ip` after loading `.env.development`, so the
flag wins for the claim and partner APIs. Other addresses come from that file,
which development web builds share:
```bash
# .env.development
VITE_DEFAULT_IMAGE_API_SERVER=https://test-image-api.timesafari.app
VITE_DEFAULT_NOTIFY_API_SERVER=https://test-notify-api.timesafari.app
VITE_APP_SERVER=http://192.168.1.100:8080
```
**Important**: Replace `192.168.1.100` with your actual IP address.
### Step 4: Start Your Local Server
If testing against local API servers, ensure they're accessible from the network: