Readme Should Include Instructions for working with UNUserNotificationCenterDelegate
Closed this issue · 2 comments
cameronehrlich commented
The readme doesn't currently show that in order to get proper open rates, if you are using UNUserNotificationCenterDelegate
you need to include the following:
extension AppDelegate: UNUserNotificationCenterDelegate {
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
Klaviyo.sharedInstance.handlePush(userInfo: response.notification.request.content.userInfo as NSDictionary)
completionHandler()
}
}
ndurell commented
Thanks for this! I'll make an update soon!