Anybody been able to get a push notification UI content extension to work?

I can successfully get a service extension to work (for both a local notification and a push notification) but I'm not able to get a UI content extension to work.


I created one using the XCode template and haven't editied it beyond that.


Then in my container app I'm doing the following to register a category:


        let customUICategory = UNNotificationCategory.init(identifier: "myNotificationCategory", actions: [], minimalActions: [], intentIdentifiers: [])
        UNUserNotificationCenter.current().setNotificationCategories([customUICategory])

And in the push payload added:


       category: "myNotificationCategory"


The XCode template automatically added the UNNotifictionExtensionCategory key to the extension Info.plist, which has the name "myNotificationCategory".


The push is sucessfully delivered to the device and displayed and a service extension is run but the content extension.


Anybody been playing around with a content extension and managed to get it to work?

Replies

I discovered that the custom UI is only displayed if the user swipes down on the notification. I was hoping to be able to customize the initial appearance of the notificaiton, seems this isn't possible.

Is this just on 3D Touch devices atm or have you managed to get this working on other iOS 10 devices?

It works on all devices, it's just cumbersome on the non-3d-touch-ones. If that annoys you, raise your voice and open a bug report.