I am trying to add a custom local notification, but I only get a stock notification with my action:

My storyboard looks like this (standard template):

I have an extension for which UNNotificationExtensionCategory set to awesomeNotification (in Info.plist). Also, the basis of this extension is the Notification Content template from iOS - Application Extension .
In my application, I have the following:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let center = UNUserNotificationCenter.current() let actions = [UNNotificationAction.init(identifier: "Hey", title: "Yo", options: UNNotificationActionOptions.foreground)] let category = UNNotificationCategory(identifier: "awesomeNotification", actions: actions, minimalActions: actions, intentIdentifiers: [], options: []) center.setNotificationCategories([category]) center.requestAuthorization([.alert, .sound]) { (granted, error) in } return true }
In my view manager in the main application, I have the following action to launch it:
@IBAction func sendPressed(_ sender: AnyObject) { let content = UNMutableNotificationContent() content.categoryIdentifier = "awesomeNotification" content.title = "Hello" content.body = "What up?" content.sound = UNNotificationSound.default() // Deliver the notification in five seconds. let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 5, repeats: false) let request = UNNotificationRequest(identifier: "FiveSecond", content: content, trigger: trigger) // Schedule the notification. let center = UNUserNotificationCenter.current() center.add(request) { (error) in print(error) } print("should have been added") }
Edit
So it works on the iPhone 6s / 6s +, a very strange behavior: 
ios10 swift swift3 uilocalnotification unusernotificationcenter
Bjarte
source share