-
Re: CacheDeleteDaily is killing location app while in-use and in the background
junkpile Dec 4, 2018 4:13 PM (in response to dhruv_1884)I’ve seen other posts about this (background location updates stopping on their own after hours or days), but nothing that specifically identified the culprit that was killing the apps in the background. Thanks for doing the troubleshooting. Please file a bug report.
As for a workaround. If you use Always permission, you can set the showsBackgroundLocationIndicator property on CLLocationManager to show the blue bar. I have no idea if that would affect whether or not the app gets killed. It should allow you to use some other API (e.g. region monitoring) to maybe restart it eventually without user intervention. But there would still be a gap in location recording.
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
tomso_p Jan 18, 2019 7:54 AM (in response to junkpile)We attempted to use the Always permission as a workaround but unfortunately our app is still being terminated by CacheDeleteDaily. We've been testing on iOS 12.1 & 12.1.2 iPhones.
This is what we've seeing in the sysdiagnose logs (logs aquired by using this process https://download.developer.apple.com/iOS/iOS_Logs/sysdiagnose_Logging_Instructions.pdf)
At some point this CacheDeleteDaily process starts
default 2019-01-12 05:04:24.265725 -0600 CacheDeleteDaily enumerating bundles of type: LSBundleTypeInstalledApp And picks up the assertion to terminate my app
default 2019-01-12 05:04:30.332460 -0600 CacheDeleteDaily Acquired termination assertion for event <BKSTerminationAssertionCreateEvent: 0x102e13720; Identifier: 289-3D3DA072-128D-4509-B4E7-164CBF820139; Name: com.MyAwesomeLocationApp; Target BundleID: com.MyAwesomeLocationApp; Efficacy: Unused> Following the advice in this forum, I created a bug and provided all the information I have. It was marked a duplicate of another bug (the original one I guess?).
I also filed a TSI (Technical Support Incident) and DTS (Developer Technical Support) said there is no workaround they can provide for my bug report :[
This is a big deal for us as our apps rely on persistent background location. Our only workaround currently is to prompt the user not to plug in their device when using background location services. The CacheDeleteDaily process only seems to run when the device is plugged in.
We found some really good information here that was being relayed from DTS: https://stackoverflow.com/questions/53005174/ios-12-terminates-apps-in-the-background-for-no-reason
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
philmartin1983 Jan 24, 2019 2:14 AM (in response to tomso_p)Does anyone know if this has been resolved in 12.1.3?
Nothing in the release notes for 12.1.3 about a fix for this, so I assume not. But wouldn't mind clarification if it has been resolved. I'm testing on a bunch of devices running 12.1.3 today.
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
eskimo Jan 25, 2019 2:14 AM (in response to philmartin1983)Does anyone know if this has been resolved in 12.1.3?
It has not. Nor has it been resolved in the just-seeded 12.2b1.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
(r. 45505724)-
Re: CacheDeleteDaily is killing location app while in-use and in the background
m_1990 Feb 4, 2019 7:32 PM (in response to eskimo)Does anyone know if this has been resolved in 12.2b2?
Nothing in the release notes for 12.2b2 about a fix for this, so I assume not. But wouldn't mind clarification if it has been resolved. I'm testing on a bunch of devices running 12.2b2 today.
My bug number is 45583576(Duplicate of 45505724).
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
eskimo Feb 5, 2019 2:49 AM (in response to m_1990)Does anyone know if this has been resolved in 12.2b2?
It’s definitely worth re-testing this on 12.2b2.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
heakins Feb 8, 2019 11:04 AM (in response to eskimo)We are experiencing the same issue on watchOS. I tested with watchOS v5.2b2, but still see the issue. Can you comment on whether this issue is being addressed in watchOS?
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
Gualtier Malde Feb 11, 2019 5:12 AM (in response to heakins)Please clarify what you mean by the "same issue"
Do you actually have a sysdiagnose with entries for CacheDeleteDaily terminating your app on the watch?
Or is it the same issue, as in, your app is stopping location updates on the watch mysteriously?
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
heakins Feb 11, 2019 9:50 AM (in response to Gualtier Malde)Yes we do. After seeing the app quit at night (while charging), I performed a sysdiagnose on the watch. I saw this line in the watch system logs:
2019-02-02 05:22:06.456561-0800 0x72e9 Default 0x1457 292 0 CacheDeleteDaily: (AssertionServices) [com.apple.assertiond:termination_assertion] Acquired termination assertion for event <BKSTerminationAssertionCreateEvent: 0x15566540; Identifier: ****; Name: com.ourcompany.ourapp.watchkitapp; Target BundleID: com.ourcompany.ourapp.watchkitapp; Efficacy: Unused>
Upgraded to watchOS v5.2b2 and still see the watch app restarting at night when the device is charging.
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
heakins Feb 14, 2019 10:05 AM (in response to Gualtier Malde)We've found that this behavior stops when the passcode on the watch is disabled. Strange...
Any updates on whether you can address this the same way you addressed it for iOS?
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
eskimo Feb 15, 2019 2:11 AM (in response to heakins)Any updates on whether you can address this the same way you addressed it for iOS?
I’m going to recommend that you file your own bug about this, specifically focused on the watchOS side of things. Make sure to include a sysdiagnose log; you can find a profile and specific instructions for watchOS on our Bug Reporting > Profiles and Logs page.
Please post your bug number, just for the record.
We've found that this behavior stops when the passcode on the watch is disabled. Strange...
Yeah, that is strange. Please include that tidbit in your bug report as well.
Also, make sure to stress that you’ve replicated this on the latest watchOS beta.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
kultek Mar 11, 2019 6:40 AM (in response to eskimo)Hi eskimo,
Are there any updates on the "CacheDeleteDaily terminating watchOS app on power-connect" bug?
I also have a watchOS app (in development) that runs in the background and records accelerometer samples using CMSensorRecorder. When the watch is connected to a power source, the app is terminated with the following messages in console.log:
assertiond: Request to create termination assertion <BKSTerminationAssertionCreateEvent: 0x1463f3b0; Identifier: 261-E26BA74B-DA17-451E-8E8B-8A02A8359D0B; Name: com.*.*.watchkitapp; Target BundleID: com.*.*.watchkitapp; Efficacy: Unused> from client <BKClientHandle: 0x1465aa40; CacheDeleteDail:261; connections: 1>
followed by:
CacheDeleteDaily: Acquired termination assertion for event <BKSTerminationAssertionCreateEvent: 0x1756b3d0; Identifier: 261-E26BA74B-DA17-451E-8E8B-8A02A8359D0B; Name: com.*.*.watchkitapp; Target BundleID: com.*.*.watchkitapp; Efficacy: Unused>
If this bug hasn't yet been resolved in the latest watchOS beta, I'll also file a bug report. One thought, do you think adding a complication might help?
Zach
-
-
-
-
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
m_1990 Feb 11, 2019 10:53 PM (in response to eskimo)> It’s definitely worth re-testing this on 12.2b2.
Dear eskimo,
I tested it with iOS 12.2 beta 2 for 1 week.
At the moment there are no problems.
I hope the problem does not occur even in the official release version.
It was a great help!
Thank you for your kindness.
Sincerely,
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
eskimo Feb 12, 2019 1:07 AM (in response to m_1990)I tested it with iOS 12.2 beta 2 for 1 week. At the moment there are no problems.
Yay! Thanks for letting us know.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
tomso_p Feb 25, 2019 8:35 AM (in response to eskimo)Thanks for reporting back! This is promising. I'm seeing that bug 45505724 is marked as Closed now.
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
tomso_p Mar 11, 2019 1:34 PM (in response to tomso_p)Got an official reply from Apple Developer Relations
"The original report on this issue, Bug ID 45505724, is closed as resolved in iOS 12.2 betas. If you still see the issue in beta 4 or a newer release, please file a new bug report."
-
-
-
-
-
-
-
-
-
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
eskimo Dec 5, 2018 1:24 AM (in response to dhruv_1884)Please file a bug report.
I second that.
Also, please post your bug number here, just for the record.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
wusaga Dec 12, 2018 10:25 PM (in response to dhruv_1884)I'm also seeing this problem.
22:13:57.647615 +0100 assertiond Request to create termination assertion <BKSTerminationAssertionCreateEvent: 0x104f38c10; Identifier: *******; Name: *******; Target BundleID: ********; Efficacy: Unused> from client <BKClientHandle: 0x105831fd0; CacheDeleteDail:2662; connections: 1>
This is while my app is using location updates in bg.
Please update with bug number so i can follow if there is a fix or possible workaround
Thanks
-
Re: CacheDeleteDaily is killing location app while in-use and in the background
eskimo Dec 13, 2018 2:30 AM (in response to wusaga)Please update with bug number so i can follow if there is a fix or possible workaround
I recommend that you file your own bug about this because:
It will get dup’d to the original bug, so you can then see the open/closed status of that bug.
It will give iOS Engineering a better understanding of this impact of this issue.
Please post your bug number, just for the record.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-