3

I have an issue starting a Notification Service Extension. After distributing the app via TestFlight certain phones had a high rate of failure to start the extension and it fails with the following log message:

default 10:13:56.071211 +0100 SpringBoard [xxx.Notification-Service] Beginning extension session... error 10:13:57.072210 +0100 SpringBoard [xxx.Notification-Service] Extension will be killed due to sluggish startup default 10:13:57.074178 +0100 SpringBoard [xxx] Deliver push notification request 50E3-E564 error 10:13:57.074550 +0100 SpringBoard Hub connection error Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named xxx.Notification-Service" UserInfo={NSDebugDescription=connection to service named xxx.Notification-Service}


The error message suggests that it takes too long to start the extension (note the nearly exact 1000ms between beginning and killing the extension).

What I did try was that I eliminated all dynamic dependencies and added them directly to my extension target. Also a rewrite of the extension in ObjC (to not have to link against Swift libraries) did not solve the issue.

Did somebody else experienced such behaviour or has an idea how to approach this problem?

bernheart
  • 43
  • 1
  • 7

1 Answers1

0

I had the same issue. It seemed that attaching the debugger to the Notification Service Extension caused a slow start of the extension.

You have to attach the debugger after the first push message arrived. This way it also shows up as debuggable process under Debug -> Attach to process -> "Your Notification Extension"

midori
  • 450
  • 6
  • 19