Skip to content

chore(geofence): add support for geofencing feature#620

Open
mrehan27 wants to merge 9 commits into
mainfrom
feature/geofence-on-device
Open

chore(geofence): add support for geofencing feature#620
mrehan27 wants to merge 9 commits into
mainfrom
feature/geofence-on-device

Conversation

@mrehan27

@mrehan27 mrehan27 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds on-device geofencing to the React Native SDK, merging feature/geofence-on-device into main. Ported to match the native iOS/Android and Flutter SDKs: an opt-in geofence module (implies Location), CustomerIO.geofence.refreshFromCurrentLocation() + locationMode config, iOS allowBackgroundDelivery, and example-app integration.

Changes

Includes previously approved/merged PRs (oldest first):

Note

Native version pins (iOS 4.7.0 / Android 4.20.0) land via #609 before this merges — do not merge until the geofence-enabled native SDKs are released.


Note

Medium Risk
Touches native init, optional Gradle/CocoaPods modules, and background location/geofence behavior; misconfiguration could affect builds or location privacy expectations, but changes are gated behind explicit opt-in flags.

Overview
Adds an opt-in geofence capability aligned with the existing optional Location module: build-time flags (customerio_geofence_enabled / Pod geofence subspec), runtime geofence on CioConfig, and CustomerIO.geofence.refreshFromCurrentLocation() via a new TurboModule.

Enabling geofence also enables Location on both platforms (native deps, CIO_LOCATION_ENABLED, and init wiring so location registers when only geofence is configured). Init accepts geofence.locationMode (AUTOMATIC / MANUAL) and iOS ios.allowBackgroundDelivery (defaults on when geofence is configured). iOS sample calls GeofenceModule.bootstrapForBackgroundDelivery on launch for cold-wake delivery without JS.

The example app turns on geofence, adds background location permissions/plist entries, and expands the location screen with background-permission UX that calls refreshFromCurrentLocation after grants.

Reviewed by Cursor Bugbot for commit 6820128. Bugbot is set up for automated code reviews on this repo. Configure here.

mrehan27 and others added 8 commits June 27, 2026 01:56
Wire the optional geofence module without enabling behavior yet:
build flags (customerio_geofence_enabled gradle property, geofence
podspec subspec), the geofence opt-in config key, and the exported
CustomerIOGeofence class. Enabling geofence also pulls in Location,
which geofence depends on, and turns on the Location build flag on both
platforms so geofence-only builds get the full Location module.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tion (#612)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…n screen (#614)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mrehan27
mrehan27 requested a review from a team as a code owner July 25, 2026 09:46
@mrehan27 mrehan27 self-assigned this Jul 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Sample app builds 📱

Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.


@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ead1d9c. Configure here.

Comment thread ios/wrappers/NativeCustomerIO.swift
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants