What's New
- Automatic push integration — The SDK can now register push tokens and track push open events on your behalf. The two are controlled by separate
Info.plistflags, so you can enable either on its own or both together. See the migration guide and README for flag names and setup. (#644, #618, #658, #613, #668)- Push token registration — The SDK captures the APNs device token and registers it with Klaviyo, replacing the need to implement
application(_:didRegisterForRemoteNotificationsWithDeviceToken:)and callKlaviyoSDK().set(pushToken:)yourself. - Push open tracking — The SDK records Opened Push events when a user taps a notification, replacing the need to implement
userNotificationCenter(_:didReceive:withCompletionHandler:)and callKlaviyoSDK().handle(notificationResponse:). Your app's ownwillPresentpresentation options are left intact. (#681) - Both flags support hybrid setups, where automatic handling runs alongside push logic your app manages itself (#699)
- Push token registration — The SDK captures the APNs device token and registers it with Klaviyo, replacing the need to implement
- Web URL support — Push notifications, push action buttons, and in-app forms can now open web URLs. (#673)
- Client subscription methods — New public API for subscribing profiles directly from the SDK. (#687)
- Logging toggle — SDK logging can now be switched on or off. (#523)
Other Changes
Improvements to API client network behavior:
- All 5xx server errors are now retried, not just a subset (#619)
- Retry delay uses whichever is longer: the server's
Retry-Aftervalue or exponential backoff (#626) - When the request queue reaches capacity, the oldest request is evicted rather than dropping the newest (#627)
Bug Fixes
- Fix a crash that could occur when the request queue was flushed while the device was offline (#692)
Full Changelog: 5.3.1...5.4.0