Add iOS support for custom API IP configuration

Extend custom API IP feature to iOS platform with platform-appropriate defaults:
- Android: Defaults to 10.0.2.2 for emulator, custom IP for physical devices
- iOS: Uses localhost for simulator, custom IP for physical devices
- Added npm scripts for iOS custom IP builds (dev:custom, test:custom)
- Updated documentation to cover both platforms with examples
- Consistent --api-ip parameter across Android and iOS build scripts

Usage:
  ./scripts/build-ios.sh --dev                    # Default localhost
  ./scripts/build-ios.sh --dev --api-ip 192.168.1.100  # Custom IP
This commit is contained in:
Matthew Raymer
2025-08-05 10:43:51 +00:00
parent 1d6418b02c
commit 3b1a63468c
4 changed files with 92 additions and 24 deletions

View File

@@ -193,9 +193,9 @@ if [ "$BUILD_MODE" = "development" ]; then
export VITE_DEFAULT_ENDORSER_API_SERVER="http://${CUSTOM_API_IP}:3000"
log_info "Android development mode: Using custom IP ${CUSTOM_API_IP} for physical device"
else
# Use default emulator IP (10.0.2.2) for Android development
# Use Android emulator IP (10.0.2.2) for Android development
export VITE_DEFAULT_ENDORSER_API_SERVER="http://10.0.2.2:3000"
log_debug "Android development mode: Using default 10.0.2.2 for emulator"
log_debug "Android development mode: Using 10.0.2.2 for emulator"
fi
fi