iOS 17.5: High Accuracy and Speed Issues After Resuming BackgroundGeolocation
Your Environment
- Plugin version: 4.14.5
- Platform: iOS
- OS version: 17.5
- Device manufacturer / model: iPhone (iOS 17.5+)
- React Native version (
react-native -v): 0.72.10 - Plugin config
BackgroundGeolocation.ready({
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
distanceFilter: 10000000,
stopTimeout: 15,
isMoving: true,
foregroundService: true,
showsBackgroundLocationIndicator: true,
stopOnTerminate: true,
startOnBoot: false,
disableStopDetection: true,
pausesLocationUpdatesAutomatically: false,
// disableMotionActivityUpdates: true,
// allowIdenticalLocations: true,
notification: {
title: 'SuperWalk',
text: 'Detecting ...',
smallIcon: 'ic_notification',
color: '#FD3D00',
},
locationAuthorizationRequest: 'WhenInUse',
backgroundPermissionRationale: {
title: t('app_inner_c.background_permission_title'),
message: t('app_inner_c.background_permission_message'),
positiveAction: t('app_inner_c.background_permission_action'),
},
locationAuthorizationAlert: {
titleWhenNotEnabled: t('app_inner_c.location_alert_title'),
titleWhenOff: t('app_inner_c.location_alert_title'),
instructions: t('app_inner_c.location_alert_message'),
cancelButton: t('app_inner_c.location_alert_cancel'),
settingsButton: t('app_inner_c.location_alert_settings'),
},
maxRecordsToPersist: 2,
disableLocationAuthorizationAlert: true,
debug: false,
logLevel: BackgroundGeolocation.LOG_LEVEL_OFF,
});
Expected Behavior
When resuming from a paused state, the app should continue to receive accurate geolocation data.
Actual Behavior
When resuming from a paused state, the app receives geolocation data with accuracy values greater than 35 (indoors), and sometimes no GPS coordinated are received.
Steps to Reproduce
- Configure the app with the provided plugin config.
- Call BackgroundGeolocation.start.
- Call BackgroundGeolocation.getCurrentPosition every 2 seconds.
- Stop calling BackgroundGeolocation.getCurrentPosition for 5 seconds.
- Resume calling BackgroundGeolocation.getCurrentPosition every 2 seconds.
- Call BackgroundGeolocation.stop, then call BackgroundGeolocation.start again, and observe that the problem persists.
- Restart the app, call BackgroundGeolocation.start, and then call BackgroundGeolocation.getCurrentPosition to see the issue is resolved.
Context
I am using the BackgroundGeolocation.getCurrentPosition method to fetch geolocation data every 2 seconds. The values obtained from this method are used within the app. When the method is called after a 5-second pause, the logs show accuracy values around 40.4 and speed as -1. The logs and values are shown below. β’ This issue occurs on iOS version 17.5 and above. β’ The distanceFilter was set high to use BackgroundGeolocation.getCurrentPosition for obtaining the current location at specific times. β’ Changing the distanceFilter to 1 resolves the issue. However, the reason for this behavior on iOS 17.5 is unclear.
Debug logs
Logs
2024-05-22 15:21:37.362 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 15:21:37.362 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 15:21:37.369 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-22 15:21:37.369
π<+37.48029161,+126.95394468> +/- 14.28m (speed 0.10 mps / course 263.52) @ 2024. 5. 22. μ€ν 3μ 21λΆ 37μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 15:21:37.369 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 15:21:37.369
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (368 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:37.370 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:21:37.370 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 14.3
2024-05-22 15:21:37.370 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:21:37.378 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-22 15:21:37.378 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: F0214337-04CE-4447-91D1-1E17BC6DEB77
2024-05-22 15:21:37.378
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:37.378
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:37.488
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | running/100 | isMoving: 1
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:39.341 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 15:21:39.341 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 15:21:39.349 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-22 15:21:39.349
π<+37.48028810,+126.95394377> +/- 14.28m (speed 0.32 mps / course 263.52) @ 2024. 5. 22. μ€ν 3μ 21λΆ 39μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 15:21:39.349 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 15:21:39.349
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (348 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:39.350 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:21:39.350 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 14.4
2024-05-22 15:21:39.350 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:21:39.357 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-22 15:21:39.357 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 3B536A73-AFEB-4639-940D-972157FE2368
2024-05-22 15:21:39.357
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:39.357
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
---------------------------- pause point ---------------------------
2024-05-22 15:21:39.946 β
-[LocationDAO clear]_block_invoke Destroyed all locations
2024-05-22 15:21:40.025
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | running/100 | isMoving: 1
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
---------------------------- resume point ---------------------------
2024-05-22 15:21:53.448 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 15:21:53.448 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 15:21:53.455 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-22 15:21:53.455
π<+37.48028548,+126.95397611> +/- 14.24m (speed 0.00 mps / course 263.52) @ 2024. 5. 22. μ€ν 3μ 21λΆ 45μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 15:21:53.455 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 15:21:53.455
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (8454 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:53.456 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:21:53.456 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 14.3
2024-05-22 15:21:53.456 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:21:53.460 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-22 15:21:53.460 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 70989B8F-6F44-4C35-BA30-6D64C9840263
2024-05-22 15:21:53.460
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:53.460
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:55.421 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 15:21:55.421 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 15:21:55.429 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-22 15:21:55.429
π<+37.48034315,+126.95402690> +/- 40.39m (speed -1.00 mps / course -1.00) @ 2024. 5. 22. μ€ν 3μ 21λΆ 53μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 15:21:55.429 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 15:21:55.429
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (1978 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:55.430 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:21:55.430 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 14.3
2024-05-22 15:21:55.430 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:21:55.437 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-22 15:21:55.437 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 98DC056C-8571-4171-984A-2A311EF2ABA1
2024-05-22 15:21:55.437
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:55.437
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:57.450 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 15:21:57.450 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 15:21:57.458 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-22 15:21:57.458
π<+37.48035043,+126.95403332> +/- 40.39m (speed -1.00 mps / course -1.00) @ 2024. 5. 22. μ€ν 3μ 21λΆ 55μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 15:21:57.458 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 15:21:57.458
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (2034 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:57.458 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:21:57.458 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 14.3
2024-05-22 15:21:57.458 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:21:57.466 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-22 15:21:57.466 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: BC66D547-B9B1-4B92-A902-C7A0BFB9469C
2024-05-22 15:21:57.466
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:57.466
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:59.414 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 15:21:59.414 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 15:21:59.421 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-22 15:21:59.421
π<+37.48035124,+126.95403402> +/- 40.39m (speed -1.00 mps / course -1.00) @ 2024. 5. 22. μ€ν 3μ 21λΆ 57μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 15:21:59.421 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 15:21:59.421
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (1968 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:59.422 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:21:59.422 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 14.3
2024-05-22 15:21:59.422 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:21:59.430 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-22 15:21:59.430 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: C208100C-CEC7-4ACB-AF29-8BDB388CEFD7
2024-05-22 15:21:59.430
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:21:59.430
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:00.365
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | running/100 | isMoving: 1
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:01.451 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 15:22:01.452 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 15:22:01.460 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-22 15:22:01.460
π<+37.48035043,+126.95403331> +/- 40.39m (speed -1.00 mps / course -1.00) @ 2024. 5. 22. μ€ν 3μ 21λΆ 59μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 15:22:01.460 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 15:22:01.460
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (2043 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:01.461 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:22:01.461 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 14.3
2024-05-22 15:22:01.461 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:22:01.468 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-22 15:22:01.468 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 4CF2F64A-1127-46F9-8B84-C14E571FFBD6
2024-05-22 15:22:01.468
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:01.468
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:03.443 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 15:22:03.443 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 15:22:03.451 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-22 15:22:03.451
π<+37.48034960,+126.95403258> +/- 40.39m (speed -1.00 mps / course -1.00) @ 2024. 5. 22. μ€ν 3μ 22λΆ 1μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 15:22:03.451 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 15:22:03.451
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (1996 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:03.451 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:22:03.451 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 14.2
2024-05-22 15:22:03.451 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:22:03.459 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-22 15:22:03.459 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: D64CF531-C8EE-4E98-ABB8-2209931D6B96
2024-05-22 15:22:03.459
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:03.459
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:05.412 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 15:22:05.412 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 15:22:05.419 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-22 15:22:05.419
π<+37.48034902,+126.95403207> +/- 40.39m (speed -1.00 mps / course -1.00) @ 2024. 5. 22. μ€ν 3μ 22λΆ 3μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 15:22:05.419 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 15:22:05.419
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (1973 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:05.419 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:22:05.419 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 40.4
2024-05-22 15:22:05.419 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:22:05.428 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-22 15:22:05.428 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: FCD939A9-D071-4E83-A892-FDA82085DFC0
2024-05-22 15:22:05.428
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:05.428
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:07.446 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 15:22:07.446 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 15:22:07.452 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-22 15:22:07.452
π<+37.48034868,+126.95403177> +/- 40.39m (speed -1.00 mps / course -1.00) @ 2024. 5. 22. μ€ν 3μ 22λΆ 5μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 15:22:07.452 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 15:22:07.452
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (2036 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:07.452 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:22:07.452 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 40.4
2024-05-22 15:22:07.452 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:22:07.461 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-22 15:22:07.461 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 83C309F3-02E9-4814-A043-B47C5216F025
2024-05-22 15:22:07.461
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:07.461
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:09.448 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 15:22:09.449 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 15:22:09.455 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-22 15:22:09.455
π<+37.48034848,+126.95403160> +/- 40.39m (speed -1.00 mps / course -1.00) @ 2024. 5. 22. μ€ν 3μ 22λΆ 7μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 15:22:09.455 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 15:22:09.455
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (2006 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:09.455 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:22:09.455 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 40.4
2024-05-22 15:22:09.455 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:22:09.465 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-22 15:22:09.465 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 320D16F6-C1DB-437C-A168-45747DB97D69
2024-05-22 15:22:09.465
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:09.465
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:11.445 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 15:22:11.445 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 15:22:11.452 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-22 15:22:11.452
π<+37.48034834,+126.95403147> +/- 40.39m (speed -1.00 mps / course -1.00) @ 2024. 5. 22. μ€ν 3μ 22λΆ 9μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 15:22:11.452 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 15:22:11.452
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (2001 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:11.453 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:22:11.453 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 40.4
2024-05-22 15:22:11.453 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:22:11.462 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-22 15:22:11.462 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 395FDB38-D273-4854-9D31-3BF68ED83F53
2024-05-22 15:22:11.462
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:11.462
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:13.433 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 15:22:13.433 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 15:22:13.440 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-22 15:22:13.440
π<+37.48034824,+126.95403139> +/- 40.39m (speed -1.00 mps / course -1.00) @ 2024. 5. 22. μ€ν 3μ 22λΆ 11μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 15:22:13.440 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 15:22:13.440
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (1991 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 15:22:13.440 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:22:13.440 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 40.4
2024-05-22 15:22:13.440 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 15:22:13.449 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-22 15:22:13.449 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 33D1F99A-C8EB-48E4-A790-68AE264D26F1
2024-05-22 15:22:13.449
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
receives geolocation data with accuracy values greater than 35 (indoors), and sometimes no GPS
There is no GPS while indoors. GPS only works outdoors.
the plug-in has no control over the accuracy of returned data. Locations are fetched by the OS. .getCurrentPosition always uses highest possible accuracy.
Hi, christocracy!
Could you please check log below?
At 14:24:37, getCurrentPosition was called. At 14:24:38, destroyLocation was called.
After that, seems isMoving value was changed to 0 by createMotionTypeChangedHandler, but I don't know the cause. In what situations is createMotionTypeChangedHandler called?
024-05-22 14:24:35.264
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 14:24:37.249 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 14:24:37.250 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 14:24:37.254 βΉοΈ+[LocationAuthorization run:onCancel:] status: 4
2024-05-22 14:24:37.254
π<+37.48040022,+126.95397994> +/- 14.24m (speed 0.12 mps / course 316.98) @ 2024. 5. 22. μ€ν 2μ 24λΆ 37μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 14:24:37.254 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 14:24:37.254
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (252 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 14:24:37.255 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 14:24:37.255 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 14.2
2024-05-22 14:24:37.255 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-22 14:24:37.262 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-22 14:24:37.262 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 7DD1806E-A7B4-472B-B896-DB315C63F24C
2024-05-22 14:24:37.262
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 14:24:37.262
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 14:24:38.837 β
-[LocationDAO clear]_block_invoke Destroyed all locations
2024-05-22 14:24:43.320
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-22 14:24:44.860 π΅-[TSLocationManager getCurrentPosition:]
2024-05-22 14:24:44.860 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-22 14:24:44.865 βΉοΈ+[LocationAuthorization run:onCancel:] status: 4
2024-05-22 14:24:44.866
π<+37.48041704,+126.95398389> +/- 14.22m (speed 0.00 mps / course 324.98) @ 2024. 5. 22. μ€ν 2μ 24λΆ 43μ΄ λνλ―Όκ΅ νμ€μ
2024-05-22 14:24:44.866 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-22 14:24:44.866
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (1863 ms old)
createMotionTypeChangedHandler
Donβt worry about the name of this. When you see this, itβs the native motion api firing a motion-activity event.
With your app one the foreground, you can cause the motion api to fire events by shaking your device vigorously. Letting it sit stationary will cause the motion api to emit the still event.
Thank you, christocracy!
I am experiencing another issue and need your help.
When getCurrentPosition is called and abnormal GPS data is received, the API continues to return abnormal GPS data until it is restarted. Here are the logs when the issue occurs (outdoors with GPS signal):
2024-05-24 12:19:01.309 π΅-[TSLocationManager getCurrentPosition:]
2024-05-24 12:19:01.309 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-24 12:19:01.316 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-24 12:19:01.316 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-24 12:19:01.316 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 35.0
2024-05-24 12:19:01.320 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-24 12:19:01.320 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 397B2AEC-CC0C-413F-A36F-630B6AF753BF
2024-05-24 12:19:03.315 π΅-[TSLocationManager getCurrentPosition:]
2024-05-24 12:19:03.315 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-24 12:19:03.322 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-24 12:19:03.322 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-24 12:19:03.323 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 35.0
2024-05-24 12:19:03.330 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-24 12:19:03.330 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 1FEC16D2-4B55-4957-A6B8-77ED7998535A
When the app is restarted and the issue is resolved, the logs look like this:
2024-05-24 12:20:27.251 π΅-[TSLocationManager getCurrentPosition:]
2024-05-24 12:20:27.251 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-24 12:20:27.267 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-24 12:20:27.267
π<+37.47984933,+126.95488101> +/- 14.19m (speed 1.04 mps / course 122.68) @ 2024. 5. 24. μ€ν 12μ 20λΆ 27μ΄ λνλ―Όκ΅ νμ€μ
2024-05-24 12:20:27.267 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-24 12:20:27.268
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (267 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-24 12:20:27.268 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-24 12:20:27.268 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 14.2
2024-05-24 12:20:27.268 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-24 12:20:27.279 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-24 12:20:27.279 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 9812A2FF-D73B-4EF2-9973-24A8F848E138
2024-05-24 12:20:27.279
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-24 12:20:27.279
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-24 12:20:29.351 π΅-[TSLocationManager getCurrentPosition:]
2024-05-24 12:20:29.352 πΎ-[LocationManager startUpdatingLocation] ON
2024-05-24 12:20:29.370 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-05-24 12:20:29.370
π<+37.47984013,+126.95488433> +/- 14.19m (speed 0.32 mps / course 139.54) @ 2024. 5. 24. μ€ν 12μ 20λΆ 29μ΄ λνλ―Όκ΅ νμ€μ
2024-05-24 12:20:29.370 π΄-[LocationManager stopUpdatingLocation] OFF
2024-05-24 12:20:29.370
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1 (369 ms old)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-24 12:20:29.371 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-24 12:20:29.371 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 14.2
2024-05-24 12:20:29.371 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-05-24 12:20:29.382 βΉοΈ-[LocationDAO shrink:]_block_invoke maxRecordsToPersist: 2
2024-05-24 12:20:29.382 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 726ABC5A-6D6D-4134-B9A9-22376708752C
2024-05-24 12:20:29.382
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-05-24 12:20:29.382
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Could you help me understand what might be causing this issue?
Create for a simple hello-world app which reproduces your problem. Share it with me in a public repo.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.