We are migrating our React Native app from Firebase deep links to Branch.io links. All scenarios work except one: when a user opens a link on iOS and doesn't have our app opened, we don't get all the branch.io data after installation.
Here is our RN code:
import branch, { BranchSubscriptionEvent } from 'react-native-branch';
useEffect(() => {
const unsubscribe = branch.subscribe((value: BranchSubscriptionEvent) => {
console.log('value', value);
//more handling of the link
};
return unsubscribe;
}, [...dependencyList]);
The object, which is logged into the console when installed on iOS through the link is:
{
"error": null,
"params": {
"+non_branch_link": "com.ourapp.app://google/link/?request_ip_version=IP%5FV4&match_message=No%20pre%2Dinstall%20link%20matched%20for%20this%20device%2E",
"+is_first_session": true,
"+clicked_branch_link": false,
"+rn_cached_initial_event": true
},
"uri": "com.ourapp.app://google/link/?request_ip_version=IP%5FV4&match_message=No%20pre%2Dinstall%20link%20matched%20for%20this%20device%2E"
}
When we open the same link on Android or when the iOS app is already installed, we can see
{
"error": null,
"params": {
"~channel": "App",
"+is_first_session": false,
//more fields...
"~feature": "Signup",
"~campaign": "Refferal",
"deeplinkURL": "our custom data to handle link",
"~tags": [
"referral"
]
},
"uri": null
}
The link was created VIA Branch.io API with payload
{
"data": {
"$desktop_url": "https://ourdomain.com",
"deeplinkURL": "our custom data to handle link"
},
"channel": "App",
"campaign": "Referral",
"feature": "Signup",
"tags": [
"referral"
],
"branch_key": "{{branchKey}}"
}
In terms of Branch.IO configuration, we have both Universal Links and NativeLink⢠disabled.
Any idea why we are getting these strange params, after iOS installation from the Quick link?