klaviyo / klaviyo-swift-sdk

Swift SDK for integrating Klaviyo’s push notifications, event tracking, and user profile management into iOS applications.
https://www.klaviyo.com/mobile-push-marketing
MIT License
12 stars 11 forks source link

Improve handling of push token / profile updates #118

Closed ndurell closed 10 months ago

ndurell commented 10 months ago

Description

The idea of this PR is to reduce the number of redundant request to the backend where possible. This PR also ensures that when token data is present that it gets assigned to the correct profile when identifiers change.

Other changes:

  1. We no longer send an anonymous profile request when the sdk is initialized.
  2. When the SDK is not initialized in DEBUG mode we throw a fatalError when setter methods are called. This will not happen in release mode.
  3. When switch identifiers we may send a token request instead of profile request to ensure the token data is assigned to the right profile

Check List

Manual Test Plan

1.

Supporting Materials