@@ -53,7 +53,7 @@ public protocol NotificationResponseProtocol {
5353
5454 var actionIdentifier : String { get }
5555
56- var textInputResponse : UNTextInputNotificationResponse ? { get }
56+ var userText : String ? { get }
5757}
5858
5959@available ( iOS 10 . 0 , * )
@@ -66,8 +66,12 @@ struct UserNotificationResponse: NotificationResponseProtocol {
6666 response. actionIdentifier
6767 }
6868
69- var textInputResponse : UNTextInputNotificationResponse ? {
70- response as? UNTextInputNotificationResponse
69+ var userText : String ? {
70+ guard let textInputResponse = response as? UNTextInputNotificationResponse else {
71+ return nil
72+ }
73+
74+ return textInputResponse. userText
7175 }
7276
7377 private let response : UNNotificationResponse
@@ -217,8 +221,8 @@ struct IterableAppIntegrationInternal {
217221 return
218222 }
219223
220- let dataFields = IterableAppIntegrationInternal . createIterableDataFields ( actionIdentifier: response. actionIdentifier, userText: response. textInputResponse ? . userText)
221- let action = IterableAppIntegrationInternal . createIterableAction ( actionIdentifier: response. actionIdentifier, userText: response. textInputResponse ? . userText, userInfo: userInfo, iterableElement: itbl)
224+ let dataFields = IterableAppIntegrationInternal . createIterableDataFields ( actionIdentifier: response. actionIdentifier, userText: response. userText)
225+ let action = IterableAppIntegrationInternal . createIterableAction ( actionIdentifier: response. actionIdentifier, userText: response. userText, userInfo: userInfo, iterableElement: itbl)
222226
223227 // Track push open
224228 if let _ = dataFields [ JsonKey . actionIdentifier. jsonKey] { // i.e., if action is not dismiss
0 commit comments