@@ -53,7 +53,7 @@ public protocol NotificationResponseProtocol {
53
53
54
54
var actionIdentifier : String { get }
55
55
56
- var textInputResponse : UNTextInputNotificationResponse ? { get }
56
+ var userText : String ? { get }
57
57
}
58
58
59
59
@available ( iOS 10 . 0 , * )
@@ -66,8 +66,12 @@ struct UserNotificationResponse: NotificationResponseProtocol {
66
66
response. actionIdentifier
67
67
}
68
68
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
71
75
}
72
76
73
77
private let response : UNNotificationResponse
@@ -217,8 +221,8 @@ struct IterableAppIntegrationInternal {
217
221
return
218
222
}
219
223
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)
222
226
223
227
// Track push open
224
228
if let _ = dataFields [ JsonKey . actionIdentifier. jsonKey] { // i.e., if action is not dismiss
0 commit comments