question

JaakBartels-7984 avatar image
2 Votes"
JaakBartels-7984 asked RobCaplan edited

iOS Watchdog transgression when launching app from VoIP push notification on older iphones

I am working on a Xamarin Forms app that needs to process VoIP calls.

The app works great on all modern iPhone models (iPhone 7 and up). However, on iPhone 6 and iPhone 6s, when the app is not running (== killed) and a VoIP Push notification comes in, the app seems to take too long to start and then is terminated by the iOS watchdog with this message:

Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Termination Description: SPRINGBOARD, process-launch watchdog transgression: <myPackage> exhausted CPU time allowance of 5.00 seconds | ProcessVisibility: Unknown | ProcessState: Running | WatchdogEvent: process-launch | WatchdogVisibility: Background | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 11.190 (user 11.190, system 0.000), 45% CPU", | "Elapsed application CPU time (seconds): 5.202, 21% CPU" | )

So, since it looked like my app was doing too much during startup, I started disabling things ... until I was left with only the bare minimum: a Xamarin Forms app that did nothing else than registering for (VoIP) push notifications and displaying the most simple UI (single page with one label and a button).

To my surprise, even with this "mini app" (nothing more than any hello world app, actually), the issue is still reproducible, though less frequently. The only culprit I can think of is the Xamarin.Forms.Init taking too long or doing too much work.

But that would imply that all Xamarin.Forms apps would have this problem.

Did anyone succeed in implementing (VoIP) push notification handling using Xamarin Forms in a way that it also works on older iPhones?
Any tips on how to proceed?





Visual Studio Enterprise 2019 for Mac
Version 8.9.10 (build 4)

Mono Framework MDK
Runtime:
Mono 6.12.0.125 (2020-02/8c552e98bd6) (64-bit)
Package version: 612000125

Roslyn (Language Service)
3.9.0-6.21152.10+c10f884b30737542ddd84ca889a4aad9281ce210

Apple Developer Tools
Xcode 12.5 (18205)
Build 12E262

Xamarin.iOS
Version: 14.16.0.5 (Visual Studio Enterprise)
Hash: ab40b131d
Branch: xcode12.5

dotnet-xamarin
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@JaakBartels-7984 Try to remove all the operation in main thread and move them to background thread.

0 Votes 0 ·

0 Answers