In short: I can add custom text input fields to respond to a push notification. I just can't get the associated application to delegate in order to actually process the input from the user.
I have two custom actions: acceptAction(a simple actionable action) and replyAction(one with a behavior UIUserNotificationActionBehaviorTextInput) added to a custom one UIMutableUserNotificationCategoryand this category added to mine UIUserNotificationSettings. All notifications are triggered properly. All buttons are displayed as UIUserNotificationTypeAlert.
While it acceptActionworks
- (void)application:(UIApplication *)application handleActionWithIdentifier:(nullable NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void(^)())completionHandler
and i cant run replyAction. I can see the text box, enter the data, click "Submit", but after that there will be no effect. I really want to capture this input text with UIUserNotificationActionResponseTypedTextKey.
What am I missing?
Additional information: Although I have no idea why, if I also implement the basic
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
along with another method, I see that it replyActionlaunches this and not the other, but acceptActiononly the first method launches.
I have also correctly set the background settings in the application.
source
share