iOS10 UNNotificationServiceExtension not called iOS10 UNNotificationServiceExtension not called ios ios

iOS10 UNNotificationServiceExtension not called


What also might do the trick is check your deployment target for the extension. Mine was set at 10.2 while the device I was testing on was (still) using 10.1

After altering the deployment target to 10.0 the UNNotificationServiceExtension instance was called perfectly


And if you've done everything correctly, don't forget to attach it to the process.

After running the app that contains the extension:

  1. Set your breakpoint in the extension
  2. Select Debug / Attach to Process by PID or name
  3. Enter the name of the extension target
  4. Trigger the push notification


Finally I have this working correctly, and this is what I remember from this issue.

1) Do not use devices with iOS10 beta version, because one of the problems I had was because I was using a beta version.

2) only the app requres APNS entitlements, this is not required for the privisoning used for the extension.

3) I was using a provisioning profile matching the id of the extension (not wildcard), anyway I cannot confirm if it works fine or not with wildcard.

4) NSExtensionAttributes are not required, just use NSExtensionPointIdentifier and NSExtensionPrincipalClass for the extension .plist. Unless you are using your own layout

5) This is working even using iOS 9 token registration methods.

6) don't forget mutable-content value in the payload coming in the push notification, this is the only mandatory value you need from the server to go through the extension.

I think this covers all the problems I had