File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,7 +53,9 @@ public class NativeCustomerIO: NSObject {
5353 // config is provided or geofence is enabled, since geofence relies on the
5454 // location module's fixes.
5555 #if CIO_GEOFENCE_ENABLED
56- let geofenceConfigured = config [ " geofence " ] != nil
56+ // Match NativeGeofence.module(from:): only a dictionary counts as configured,
57+ // so a non-map value (e.g. null bridged from JS) doesn't imply location.
58+ let geofenceConfigured = config [ " geofence " ] as? [ String : Any ] != nil
5759 #else
5860 let geofenceConfigured = false
5961 #endif
@@ -71,7 +73,9 @@ public class NativeCustomerIO: NSObject {
7173
7274 // Customer value wins; default on when the geofence module is added, off otherwise.
7375 #if CIO_GEOFENCE_ENABLED
74- let geofenceAdded = config [ " geofence " ] != nil
76+ // Match NativeGeofence.module(from:): only a dictionary adds the module, so
77+ // background delivery shouldn't default on for a non-map geofence value.
78+ let geofenceAdded = config [ " geofence " ] as? [ String : Any ] != nil
7579 #else
7680 let geofenceAdded = false
7781 #endif
You can’t perform that action at this time.
0 commit comments