Required Reading
Plugin Version
5.0.5
Mobile operating-system(s)
Device Manufacturer(s) and Model(s)
iPhone 16 Pro Max
Device operating-systems(s)
iOS 26.4.2
React Native / Expo version
0.79.6, Expo 53
What happened?
When I set this in my config:
BackgroundGeolocation.ready({
...
activity: {
triggerActivities: ["in_vehicle"],
},
...
})
I get this error in the logs:
2026-05-19 21:48:21.925 ⚠️-[TSConfigModuleBase setValue:forProperty:] TSActivityConfig: Could not set 'triggerActivities': -[__NSSingleObjectArrayI length]: unrecognized selector sent to instance 0x142801fd0
What I'm attempting to do is restrict what movement will reset the stop-timeout counter. It resets constantly and will never let the app go back to stationary mode.
Plugin Code and/or Config
BackgroundGeolocation.ready({
geolocation: {
locationAuthorizationRequest: "Always",
desiredAccuracy: BackgroundGeolocation.DesiredAccuracy.High,
distanceFilter: Platform.OS === "android" ? 0 : undefined,
locationUpdateInterval: Platform.OS === "android" ? 10 * 1000 : undefined,
fastestLocationUpdateInterval: Platform.OS === "android" ? 5 * 1000 : undefined,
allowIdenticalLocations: Platform.OS === "android" ? false : undefined,
activityType: Platform.OS === "ios" ? BackgroundGeolocation.ActivityType.AutomotiveNavigation : undefined,
pausesLocationUpdatesAutomatically: Platform.OS === "ios" ? false : undefined,
},
activity: {
disableStopDetection: false, // Let RNBG handle stop detection
triggerActivities: ["in_vehicle"],
},
app: {
stopOnTerminate: false,
startOnBoot: true,
heartbeatInterval: 5 * 60,
...(Platform.OS === "android"
? {
enableHeadless: true,
foregroundService: true,
notification: {
title: "Mileage Quest",
text: "Tracking your mileage in the background",
channelName: "Mileage Tracking",
priority: BackgroundGeolocation.NotificationPriority.Low,
},
backgroundPermissionRationale: {
title:
"Allow Mileage Quest to access your location in the background?",
message:
"Mileage Quest needs background access to automatically detect and log your trips for mileage tracking, even when the app is closed or not in use.",
positiveAction: "Change to {backgroundPermissionOptionLabel}",
negativeAction: "Cancel",
},
}
: {}),
...(Platform.OS === "ios"
? {
preventSuspend: true,
} : {}),
},
logger: {
debug: true,
logLevel: BackgroundGeolocation.LogLevel.Verbose,
},
http: {
autoSync: false,
},
persistence: {
maxDaysToPersist: 7,
},
})
Relevant log output
Required Reading
Plugin Version
5.0.5
Mobile operating-system(s)
Device Manufacturer(s) and Model(s)
iPhone 16 Pro Max
Device operating-systems(s)
iOS 26.4.2
React Native / Expo version
0.79.6, Expo 53
What happened?
When I set this in my config:
I get this error in the logs:
What I'm attempting to do is restrict what movement will reset the stop-timeout counter. It resets constantly and will never let the app go back to stationary mode.
Plugin Code and/or Config
Relevant log output