The app generates lots of background termination logs with the 0x8badf00d code and no additional info. System log contains lines like:
Forcing crash report with description: _______:1699 has active assertions beyond permitted time:
<BKProcessAssertion: 0x10223d100; "will present notification" (notificationAction:30s); id:\M-b\M^@\M-&F41DA0DAE03D> (owner: SpringBoard:58)
It usually means that the app fails to call completion handler after receiving a remote notification, but that shouldn't be the case:
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
Logger.shared.log("AppDelegate", "remoteNotification: \(userInfo)")
completionHandler(UIBackgroundFetchResult.noData)
}
But the logs show nothing, and the app would call the completion handler anyway. Additionally, I don't expect the backend to generate any APNS notifications at the moment.
The app also uses VoIP notifications via PushKit, but they don't have any completion handlers, and the VoIP APNS certificate is expired anyway, so there should be none.
The app may generate local notifications using UNNotificationRequest, but there seems to be no completion handlers there either.
I'd appreciate any help.