Post

Replies

Boosts

Views

Activity

Reply to Lifecycle and Usage of CLServiceSession after the app is terminated
Hi, Thanks for your help! I was able to run the app without any issue but after upgrading Xcode to v26.x.x, I am having similar issue again. I’m encountering an issue with background location tracking stopping after the app remains in the background/killed mode for around 1–2 days. After some time in the background, the location events stop arriving entirely. While diagnosing the issue, I noticed logs/messages related to “service session required”. I would like clarification regarding CLServiceSession lifecycle management. Currently, I create the session locally inside a function like this: let session = CLServiceSession( authorization: .always, fullAccuracyPurposeKey: "Trip" ) I’m wondering whether the session being scoped locally could cause the service session to be deallocated or invalidated, eventually stopping background location delivery. Would it be more appropriate to maintain a strong reference at the class level, for example: private var serviceSession: CLServiceSession? and then initialize it as: serviceSession = CLServiceSession( authorization: .always, fullAccuracyPurposeKey: "Trip" ) Could the lack of a persistent reference to CLServiceSession affect: continuation of background location updates, service session validity, or app relaunch behavior after extended background execution? Could this behavior be related to ARC deallocating a locally scoped CLServiceSession instance after the function exits? Thanks.
May ’26
Reply to Lifecycle and Usage of CLServiceSession after the app is terminated
Hi, Thanks for your help! I was able to run the app without any issue but after upgrading Xcode to v26.x.x, I am having similar issue again. I’m encountering an issue with background location tracking stopping after the app remains in the background/killed mode for around 1–2 days. After some time in the background, the location events stop arriving entirely. While diagnosing the issue, I noticed logs/messages related to “service session required”. I would like clarification regarding CLServiceSession lifecycle management. Currently, I create the session locally inside a function like this: let session = CLServiceSession( authorization: .always, fullAccuracyPurposeKey: "Trip" ) I’m wondering whether the session being scoped locally could cause the service session to be deallocated or invalidated, eventually stopping background location delivery. Would it be more appropriate to maintain a strong reference at the class level, for example: private var serviceSession: CLServiceSession? and then initialize it as: serviceSession = CLServiceSession( authorization: .always, fullAccuracyPurposeKey: "Trip" ) Could the lack of a persistent reference to CLServiceSession affect: continuation of background location updates, service session validity, or app relaunch behavior after extended background execution? Could this behavior be related to ARC deallocating a locally scoped CLServiceSession instance after the function exits? Thanks.
Replies
Boosts
Views
Activity
May ’26
Reply to Beacon Exits region and is unavailable for extended periods
We have also observed that the beacon RSSI reading is 0 most of the times and when values are received, they typically fall between 0 and -90 dBm. We have not encountered any values lower than -90. Are there any settings/configuration we can apply to receive more accurate RSSI measurements? Device Information: iOS version 17 and 18
Replies
Boosts
Views
Activity
Oct ’25
Reply to Beacon Exits region and is unavailable for extended periods
I can confirm that the beacons that we are using are fully compatible with the iBeacon specification. Note: Our beacon also supports detection via Bluetooth along with iBeacon.
Replies
Boosts
Views
Activity
Oct ’25