Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for profile key enums mismatching #143

Merged
merged 2 commits into from
Apr 9, 2024
Merged

Conversation

evan-masseau
Copy link
Contributor

@evan-masseau evan-masseau commented Apr 4, 2024

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

  • Are you changing anything with the public API?
  • Are your changes backwards compatible with previous SDK Versions?

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

Changelog / Code Overview

  • Added a patch to the swift bridge file so that using setProfileAttribute with an identifier enum will be routed to the correct setter function (consistent with how android would behave)
  • Deprecated the enums with warning, to be removed in next release.

Test Plan

Tested with the example app with and without this change.

Related Issues/Tickets

Related android PR klaviyo/klaviyo-android-sdk#150
CHNL-7225

@evan-masseau evan-masseau requested a review from a team as a code owner April 4, 2024 17:57
@evan-masseau evan-masseau requested review from ajaysubra and removed request for a team April 4, 2024 17:57
@evan-masseau evan-masseau merged commit 878dbb4 into master Apr 9, 2024
5 checks passed
@evan-masseau evan-masseau deleted the ecm/profile-key-issue branch April 9, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants