When trying to debug a UNNotificationServiceExtension on an iOS 11 device, Xcode cannot correctly connect to the Extension process, and the process itself will be killed by Springboard before it can intercept and process the received notification.
This always happens when starting the Schema created by Xcode to debug the extension. Usually, when debugging an application (with the main application scheme), NotificationServiceExtension works fine and intercepts notifications (but it cannot be debugged).
The following logs will appear on the deviceβs console:
error SpringBoard [com.acme.notification] Extension will be killed due to sluggish start
error Connection error with SpringBoard Hub Domain error = NSCocoaErrorDomain Code = 4097 "connection to the service with the name com.acme.notification" UserInfo = {NSDebugDescription = connection with the service with the name com.acme.notification}
Sometimes Xcode also pops up an error dialog when it receives a notification (right when the debugger needs to connect):
Failed to connect to pid: "{PID NUMBER}"
Make sure that "com.acme.notification" is not already running, and that {USER} has permission to debug it.
Please note that on a device with iOS 10 this works fine, Extension gets the ability to handle the notification, and the debugger will normally connect and violate the extension code.
Is there something I am missing here, or is this a mistake I have to report to Apple? Anyone who has the same behavior?
source share