I've got a notification service extension which is working as expected unless the user a) turns the passcode for the iPhone on and b) turns on Auto-lock and the iPhone is locked when a push arrives If auto-lock is turned on and the phone is locked but passcode is not turned on, then the notification is displayed as expected.
The iPhone displays a notification with the top line being the name of the app and the second line saying "Notification", which is neither the content within the push payload, not what is being set as the content within the extension.
There's no difference in behaviour of the extension when passcode is enabled. Adding logging to the extension I can confirm the content is being replaced and posted as expected:
NSLog("Going to post notification title: \(notificationContent.title) subtitle: \(notificationContent.subtitle) body: \(notificationContent.body)")
contentHandler(notificationContent)
The notificationContent is as expected and is identical when passcode is on off. Why is the iPhone displaying the notification incorrectly if passcode is turned on and the phone locked?