Using authenticationRequired with UNTextInputNotificationAction breaks lockscreen

Originator:davbeck
Number:rdar://30903812 Date Originated:07-Mar-2017 01:49 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:iOS 10.2.1
Classification:Notifications Reproducible:Always
 
Summary:
If you create a notification action for text input and require the user authenticate before activating it, trying to use the action from the lock screen will break the layout (see the attached screenshot).

Steps to Reproduce:
Sample code:

let replyAction = UNTextInputNotificationAction(
	identifier: NotificationActions.reply.rawValue,
	title: NSLocalizedString("Reply", comment: "Chat reply notification action title"),
	options: [
		.authenticationRequired,
	],
	textInputButtonTitle: NSLocalizedString("Send", comment: "Chat notifiation reply button"),
	textInputPlaceholder: NSLocalizedString("New messageā€¦", comment: "Chat notification reply placeholder")
)

let chatCategory = UNNotificationCategory(
	identifier: "chat",
	actions: [replyAction],
	intentIdentifiers: [],
	options: []
)

UNUserNotificationCenter.current().setNotificationCategories([
	chatCategory,
])


Then, from the lock screen
- Force touch a notification with the corresponding category.
- Enter something in the text field.
- Tap the send button.

Expected Results:
The user should be asked for their passcode or Touch ID before the text is sent to the app or the content extension.

Actual Results:
The keyboard turns black, but remains above the lock screen. The text input bar also remains in place. Behind both of those is the standard passcode entry screen, but it is blocked partially by the keyboard and input bar.

Comments

https://jira.acstechnologies.com/secure/attachment/40824/something_wrong.jpg


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!