At the time of asking, this was not possible using the provided API. UIUserNotificationAction
objects only represented additional buttons you can add, but you cannot input text directly. For now, you should add a "Reply" button, and on tap, opens the app with the keyboard visible so users can reply.
With iOS 9 SDK, this is possible by setting UIUserNotificationActionBehaviorTextInput
as the behavior
of the notification action.
Make sure to read the documentation for more information.
See this answer for an example how to achieve this in Swift.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…