react-native-branch-deep-linking-attribution
react-native-branch-deep-linking-attribution copied to clipboard
[SDK-1562] Add callback to setIdentity
Description
Adds a new method, setIdentityWithPromise, which sets the identity/developer_identity and has a promise with returns the first referring params. There already is a setIdentity functions which works the same and will still exist. However, it is void/does not return, which is why adding a new method which does.
The native SDKs have two versions of setIdentity, one with a callback and one thats void. This new method uses the one with a callback.
Usage/Examples
Existing setIdentity()
branch.setIdentity("user123")
New setIdentityWithPromise()
let result = branch.setIdentityWithPromise("user456");
result.then((params) => {
console.log('setIdentityWithPromise Result: ', params)
});
Can you add more to the description? What did the calls look like previously and what have they changed to now?