Posts

Post not yet marked as solved
3 Replies
1.9k Views
I'm scheduling a long-running, suspendable, CPU heavy ML inference task to be run when device is on power with BGProcessingTask. According to Apple, I'm supposed to get unlimited CPU for a couple minutes, then a few seconds to stop with the time-expired callback. When I run my task manually (with the LLDB command from Apple's BGTasks documentation) everything works fine. However, when the task runs organically in the background, it's killed after about a minute with Terminated due to signal 9 I checked the reason from device logs and it's due to CPU utilization Event: cpu usage Action taken: Process killed CPU: 48 seconds cpu time over 50 seconds (97% cpu average), exceeding limit of 80% cpu over 60 seconds This doesn't make any sense, as the whole point of BGProcessingTask is disabling the CPU limits for a few minutes to run big tasks in the background. See this short clip: https://developer.apple.com/videos/play/wwdc2019/707/?time=1069 CPU Monitor is a feature in our systems that automatically terminates apps that use too many CPU cycles in the background in order to protect user's battery life.For the first time ever, we're giving you the ability to turn that off for the duration of your processing task so you can take full advantage of the hardware while the device is plugged in.And finally, we'll make sure that you're eligible to run these tasks as long as you request them when your app is foreground or if your app has been recently used in the foreground. Any idea why this is happening? Full callstack: https://paste bin.com/aaM264Pe
Posted
by Zaptrem..
Last updated
.
Post not yet marked as solved
1 Replies
1.9k Views
Hello, I've been trying to implement some features in an app that uses iOS's Speech API but have run into some problems I haven't been able to solve for months:Most Important: What do these obscure errors mean and how can I fix them? Mostly I get kAFAssistantErrorDomain 203/1107 "(Null)" but occasionally others. The localized error message simply says "The operation couldn't be completed." There are no results on Google for these errors and no mention in the documentation.result.BestTranscription.formattedString keeps resetting, e.g., My My name My name is Paul, //(All okay so far) and //(Resets here for some reason) and I and I program. Expected final result: "My name is Paul, and I program." Actual final result: "and I program."Transcriptions sometimes rip full names/other personal details out of the client phone and place them into the transcription (e.g., The square root of Ryan Tracy is 27). Is there any way to disable this feature? In the future, I plan to provide contextual strings.I'm using on-device recognition to transcribe hours-long recordings (I'm requiring on-device recognition support so I don't hog Apple servers). However, I can't seem to keep recognition running in the background. Is there a solution to this? Alternatively, can I pause a recognition process when backgrounding and pick up where I left off when the app is next opened?Any help with these issues would be appreciated!
Posted
by Zaptrem..
Last updated
.