How can I access in
func didReceive(_ notification: UNNotification) {
the additional data from the payload?
@appcelerate You should setup a OSHandleNotificationActionBlock block which will give you a Object where this has been parsed for you. See initWithLaunchOptions for an example of setting one up.
Closing due to inactively. Feel free to reopen if you have more questions on this callback.
@appcelerate if you still need it:
guard let customData = notification.request.content.userInfo["custom"] as? Dictionary<String,Any> else { return }
guard let oneSignalAdditionalData = customData["a"] as? Dictionary<String,String> else { return }
Remember! _Additional data_ is always [String: String]
Most helpful comment
@appcelerate if you still need it:
Remember! _Additional data_ is always [String: String]