Attached a symbolicated crash report from one of those Xcode sessions to FB16595418. If I'm understanding this right, it looks like BGTaskScheduler registerForTaskWithIdentifier is already being called internally by the modifier.
Thread 2 Crashed:
0 libsystem_kernel.dylib 0x1ef16f1dc __pthread_kill + 8
1 libsystem_pthread.dylib 0x2281a3b40 pthread_kill + 268
2 libsystem_c.dylib 0x1a5f9c234 __abort + 132
3 libsystem_c.dylib 0x1a5f9c1b0 abort + 136
4 libc++abi.dylib 0x2280cd5a0 abort_message + 132
5 libc++abi.dylib 0x2280bbf10 demangling_terminate_handler() + 344
6 libobjc.A.dylib 0x19b560e48 _objc_terminate() + 156
7 libc++abi.dylib 0x2280cc8b4 std::__terminate(void (*)()) + 16
8 libc++abi.dylib 0x2280cfe1c __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 88
9 libc++abi.dylib 0x2280cfdc4 __cxa_throw + 92
10 libobjc.A.dylib 0x19b55ee74 objc_exception_throw + 448
11 Foundation 0x19d3a6990 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 288
12 BackgroundTasks 0x236e9d6ec -[BGTaskScheduler _unsafe_registerForTaskWithIdentifier:usingQueue:launchHandler:] + 448
13 BackgroundTasks 0x236e9d4ec -[BGTaskScheduler registerForTaskWithIdentifier:usingQueue:launchHandler:] + 128
14 SwiftUI 0x1a2b77b4c -[BGTaskSchedulerProxy registerForTaskWithIdentifier:launchHandler:] + 220
15 SwiftUI 0x1a34a8028 closure #1 in AppRefreshBackgroundTask.register() + 344
16 SwiftUI 0x1a27cbe15 <deduplicated_symbol> + 1
17 SwiftUI 0x1a293c239 <deduplicated_symbol> + 1
18 SwiftUI 0x1a27ac829 <deduplicated_symbol> + 1
19 libswift_Concurrency.dylib 0x1a9adbcc9 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1
Topic:
App & System Services
SubTopic:
Processes & Concurrency
Tags: