Skip to content

fix(config): fix backend URL for real-device testing#7

Merged
thlaure merged 2 commits into
mainfrom
fix/real-device-backend-connectivity
May 3, 2026
Merged

fix(config): fix backend URL for real-device testing#7
thlaure merged 2 commits into
mainfrom
fix/real-device-backend-connectivity

Conversation

@thlaure
Copy link
Copy Markdown
Owner

@thlaure thlaure commented May 3, 2026

Summary

  • Fix stale LAN IP (192.168.1.55192.168.1.20) in both BackendApiService and CaregiverBackendService
  • Remove Android-emulator-only 10.0.2.2 branch — physical Android devices need the LAN IP same as iOS
  • Add NSAppTransportSecurity/NSAllowsArbitraryLoads to caregiver Info.plist — ATS blocks plain HTTP on iOS by default
  • Commit missing caregiver_app/ios/Podfile.lock, apply dart format, update deprecated color tokens, extend .gitignore for SwiftPM

Test plan

  • make check passes (format + 58 tests + analyze) ✅
  • Aidée app on Pixel 6 Pro reaches backend — device registration and invite creation confirmed in DB
  • Caregiver app on iPhone 16 accepts invite — caregiver_links row with status=active confirmed in DB
  • Trigger fall on Pixel, wait full 30s, verify fall_alerts row appears in DB
  • Add GoogleService-Info.plist before testing push notification delivery (currently blocked — Firebase not configured)
  • Remove NSAllowsArbitraryLoads or scope to LAN domain before any App Store submission

🤖 Generated with Claude Code

Thomas Laure and others added 2 commits May 3, 2026 19:22
Both BackendApiService and CaregiverBackendService used two wrong
assumptions for physical device builds:

1. _devMachineLanIp was set to 192.168.1.55 (stale); updated to
   192.168.1.20 (current dev machine address).

2. The Android branch unconditionally returned http://10.0.2.2:8002,
   which only routes on the Android emulator. Physical Android devices
   need the LAN IP the same as iOS. The emulator-specific branch is
   removed; both platforms now fall through to _devMachineLanIp or
   BACKEND_BASE_URL when defined at build time.

Add NSAppTransportSecurity/NSAllowsArbitraryLoads to the caregiver
app's Info.plist so iOS allows plain-HTTP connections to the LAN
backend during development (ATS blocks HTTP by default on iOS 9+).

Also includes:
- caregiver_app Podfile.lock committed (was missing)
- dart format applied to all caregiver_app lib files
- home_screen color tokens updated to surfaceContainerHigh / onSurface
  / onSurfaceVariant (secondaryContainer family deprecated)
- .gitignore extended to exclude SwiftPM-generated xcshareddata

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove Bash(git push:*) from deny list so push can run without
manual override.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thlaure thlaure merged commit 6a49940 into main May 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant