android-branch-deep-linking-attribution
android-branch-deep-linking-attribution copied to clipboard
addCustomMetadata accepts only strings, but on iOS you can add any serializable there
I have a production iOS app with branch SKD which has this data format:
"user": {
"name": "Alice",
"id": "386d129e-1c7f-4f81-abf0-78da2e6963cb",
"gender": "FEMALE"
}
Builder looks like:
let buo = BranchUniversalObject(title: inviteText)
buo.contentMetadata.customMetadata["user"] = CurrentProfile.shared.partner!.toJSON()
.toJSON() method returns [Stirng: Any].
With Android SDK you can only set string to customMetadata object, which makes supporting working iOS app impossible.
public ContentMetadata addCustomMetadata(String key, String value) {
customMetadata.put(key, value);
return this;
}
I can publish an update to iOS app which will convert user JSON to string before setting it to customMetadata, but can you please add consistency to this API between iOS and Android?
Investigating.
Logged Ticket #SDK-583
Note that this may not be working as you expect on iOS. Could you confirm that the JSON data is making it to the dashboard?
Sure. Where can I check it? On iOS I received "user" as a dictionary, so it works as I expected.