I make a dynamic link and add a parameter (token or id) there. The logs show that a dynamic link is being created with this parameter, but when i accept link there are deep link with no parameters. It remains the way I put it in Firebase.
const buildLink = async () => {
const link = await dynamicLinks().buildLink({
link: `https://letssin.app/invite${checklistToken.token}`,
domainUriPrefix: 'https://letssin.page.link/invite',
android: {
packageName: 'PACKAGE_NAME',
},
ios: {
bundleId: 'BUNDLE_ID',
appStoreId: 'APP_STORE_ID',
},
});
console.log('buildLink - ', link);
return link;
};
useEffect(() => {
const unsubscribe = dynamicLinks().onLink(link => {
console.log('Link - Foreground -//- ', link);
handleDynamicLink(link);
});
return () => unsubscribe();
}, [handleDynamicLink]);
useEffect(() => {
dynamicLinks()
.getInitialLink()
.then(link => {
console.log('Link - Background/Quit -//- ', link);
handleDynamicLink(link);
});
}, []);
Here is the logs
LOG buildLink - https://letssin.page.link/invite?apn=PACKAGE_NAME&ibi=BUNDLE_ID&isi=APP_STORE_ID&link=https%3A%2F%2Fletssin.app%2Finvite751570f0-ca10-43ef-8b01-b8b692a86cfc
LOG Link - Foreground -//- {"minimumAppVersion": null, "url": "https://letssin.app/invite", "utmParameters": {"utm_campaign": "Invite For Checklist & qrcode", "utm_medium": "dynamic_link", "utm_source": "firebase"}
Dependencies
"@react-native-firebase/app": "^12.8.0",
"@react-native-firebase/dynamic-links": "^12.8.0",
"react": "17.0.1",
"react-i18next": "^11.11.4",
"react-native": "0.64.2",
"react-native-share": "^7.2.0",
Tell me what I'm doing wrong and how I can pass and accept this parameter in the application?