klaviyo / klaviyo-react-native-sdk

MIT License
4 stars 3 forks source link

Patch for profile key enums mismatching #143

Closed evan-masseau closed 5 months ago

evan-masseau commented 5 months ago

Description

iOS SDK does not use enums for profile identifiers external_id, email and phone_number and isn't intended to consume identifiers with setProfileAttribute. Since RN is exposing those enums cross-platform, it is reasonable a developer could expect to set identifiers with that method. But we discovered that could lead to an iOS issue with identifiers not getting tracked in internal state when set via setProfileAttribute, though the identifier still makes it to the backend for that profile. To resolve this confusion, we're deprecating these enums on android and RN to discourage setting identifiers via the attribute setter method. In a future release we will delete them entirely, but in the mean time updated the bridging behavior to direct any identifiers set with these profile keys to use the explicit setter functions.

Check List

Yes it is a change to the SDK's API, but a deprecation is backward compatible.

Changelog / Code Overview

Test Plan

Tested with the example app with and without this change.

Related Issues/Tickets

Related android PR https://github.com/klaviyo/klaviyo-android-sdk/pull/150 CHNL-7225