PLATFORM AND VERSION iOS Development environment: Xcode 16.2, macOS 15.5 Run-time configuration: iOS 18
DESCRIPTION OF PROBLEM Our app (a VoIP and messaging app) has been experiencing a crash when running in the background for long periods of time (a couple of days) while receiving calls, and message notifications. If the app is not receiving notifications, we don't get any crashes while it runs in the background.
It is worth mentioning that we have several pushes that are background pushes and they could happen depending on the outcome of an incoming call. We have the two pushes:
- incoming call bye: let the app know that the calling end hanged up the call.
- incoming call answered: lets the app know that another device (with the same shared number) answered the call (web app, Android).
Those pushes are delivered within 30 seconds after the call starts. I assume that since the app was awakened by a VoIP push, those background notification won't count towards the iOS restriction of not getting too many background pushes: "The number of background notifications allowed by the system depends on current conditions, but don’t try to send more than two or three per hour."
Let me know if the above assumption is not accurate.
I don't see details in the crash report (such as a "Termination Description") that could guide me to address the issue. So I would appreciate if you can give me some insight on what could be causing this.
Here is part of the crash report: Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: FRONTBOARD 0xbaadca11 <RBSTerminateContext| domain:10 code:0xBAADCA11 explanation:<no explanation given> reportType:CrashLog maxTerminationResistance:Interactive>
Triggered by Thread: 0
Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001dda93ce4 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x00000001dda9739c mach_msg2_internal + 76 (mach_msg.c:201) 2 libsystem_kernel.dylib 0x00000001dda972b8 mach_msg_overwrite + 428 (mach_msg.c:0) 3 libsystem_kernel.dylib 0x00000001dda97100 mach_msg + 24 (mach_msg.c:323) 4 CoreFoundation 0x000000018c886900 __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2637) 5 CoreFoundation 0x000000018c8851f0 __CFRunLoopRun + 1208 (CFRunLoop.c:3021) 6 CoreFoundation 0x000000018c886c3c CFRunLoopRunSpecific + 572 (CFRunLoop.c:3434) 7 GraphicsServices 0x00000001d9a65454 GSEventRunModal + 168 (GSEvent.c:2196) 8 UIKitCore 0x000000018f299274 -[UIApplication run] + 816 (UIApplication.m:3845) 9 UIKitCore 0x000000018f264a28 UIApplicationMain + 336 (UIApplication.m:5540) 10 SwiftUI 0x00000001913a97a4 closure #1 in KitRendererCommon(:) + 168 (UIKitApp.swift:68) 11 SwiftUI 0x00000001910af01c runApp<A>(_:) + 112 (UIKitApp.swift:16) 12 SwiftUI 0x00000001910aeed0 static App.main() + 180 (App.swift:136) 13 TheApp Business 0x0000000100686028 static TheApp_BusinessApp.$main() + 52 (TheApp_Business.swift:0) 14 TheApp Business 0x0000000100686028 main + 64 15 dyld 0x00000001b375bf08 start + 6040 (dyldMain.cpp:1450)
STEPS TO REPRODUCE
- Open the app.
- Leave the app running in the background while it is receiving notifications (VoIP or messages).
- Bring the app to the foreground after a day or two of it running in the background.
- Notice that after opening the app, the launch screen is presented.