klaviyo/klaviyo-swift-sdk

Readme Should Include Instructions for working with UNUserNotificationCenterDelegate

Closed this issue · 2 comments

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()
    }
}

Thanks for this! I'll make an update soon!

Should be addressed here. Thanks!