Leanplum / Leanplum-iOS-SDK

Leanplum's integrated solution delivers meaningful engagement across messaging and the in-app experience.
https://www.leanplum.com
Apache License 2.0
71 stars 59 forks source link

Implement migration identity keys #556

Closed nzagorchev closed 1 year ago

nzagorchev commented 1 year ago
What Where/Who
JIRA Issue SDK-2684
People Involved @nzagorchev

Background

Identity keys are received through getMigrateState and set in the CleverTap configuration. Example JSON:

{
    "ct" : {
        "accountId" : "accId",
        "attributeMappings" : ...,
        "identityKeys" : ["Identity", "Phone", "Email"]
    };
    ...
}

The default value is "Identity".

If the keys are missing in the API response, or they are an empty array, they will not be updated. This means that previously saved or default keys will be used. The keys that come from the API will not be further validated and will be passed directly as-is to the CT Config.

Implementation

Testing steps

Is this change backwards-compatible?