CacheDeleteDaily is killing location app while in-use and in the background

We have two location tracking apps, that businesses heavily use. We prefer to use the While Using permissions, this way when the app is in the background a blue band appears on the home screen, thus giving the end users the confidence that the app is tracking their location


Since iOS 12 we've been noticing that both our locations apps seem to die at the same time.

If they are restarted after that, they work fine till the next day but again they will die at the same time.


After checking the Console logs, it looks like its the CacheDeleteDaily service that kills the apps.


One would expect that if the app is in use, the CacheDeleteDaily wouldn't kill it. Is someone else also seeing this behaviour?


Does anyone know of any way to workaround/correct this?

Replies

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/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thanks for reporting back! This is promising. I'm seeing that bug 45505724 is marked as Closed now.

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

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."