Skip to content

feat(mobile): bypass GPS proximity check on iOS browsers via RemoteConfig - #436

Merged
masch merged 1 commit into
mainfrom
feat/ios-browser-geofence-bypass
Aug 31, 2026
Merged

feat(mobile): bypass GPS proximity check on iOS browsers via RemoteConfig#436
masch merged 1 commit into
mainfrom
feat/ios-browser-geofence-bypass

Conversation

@masch

@masch masch commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Summary

Bypasses the GPS proximity check specifically when running inside iOS web browsers (Safari, Chrome on iOS, iPadOS web), allowing experiences to be played without location gating.
Integrated with the RemoteConfig architecture (GET /config) so the behavior can be toggled on/off dynamically from the server via BYPASS_GEOFENCE_IOS_BROWSER env var without client recompilation or redeployment.

Resolves #435

Reasoning

Web geolocation on iOS Safari / iOS Web exhibits precision and permissions issues that often prevent legitimate listeners from playing experiences even when on site.
Enforcing proximity check on Android Web, Desktop Web, and native iOS/Android apps is preserved, while iOS Web listeners are unblocked.

Changes

  • Shared: Added bypassIosBrowser: z.boolean().default(true) to RemoteConfigPayloadSchema.geofence and DEFAULT_REMOTE_CONFIG.
  • API: Injected BYPASS_GEOFENCE_IOS_BROWSER parsing into configGuard middleware and served dynamic geofence.bypassIosBrowser in GET /config.
  • Mobile:
    • Added isIosBrowser() helper detecting iOS Web environments (iPhone/iPad UA or iPadOS touch points on Platform.OS === 'web').
    • Added bypass logic to useOfflineGeofence when isIosBrowser() && config.geofence.bypassIosBrowser.
    • Added unit test suites covering all edge cases with 100% coverage.

Test Plan

  • bun test --cwd packages/shared (165 passed)
  • bun run --cwd apps/api test (512 passed)
  • bun run --cwd apps/mobile jest (580 passed)
  • bun run --cwd apps/mobile typecheck & bun run --cwd apps/api typecheck (0 errors)
  • bun run --cwd apps/mobile lint & bun run --cwd apps/api lint (0 errors)
  • bun x react-doctor --verbose --diff (Score: 100/100)

@masch masch left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥦

@masch
masch merged commit c2faff1 into main Aug 31, 2026
16 checks passed
@masch
masch deleted the feat/ios-browser-geofence-bypass branch August 31, 2026 02:31
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.

feat: bypass GPS proximity check on iOS browsers via RemoteConfig

1 participant