1

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?

1 Answer 1

1

the link param should be with a deep link. you have passed it like: https://letssin.app/invite${checklistToken.token} but I think it should be something like this: https://letssin.app/?in_app=myapp://screen/?invite${checklistToken.token}

Maybe I'm wrong but it is worth trying.

Sign up to request clarification or add additional context in comments.

2 Comments

Hi there i tried it, but unfortunately, it didn't work. Do you have any other possible solutions?
You need to handle in_app param in your app, and extract the deeplink from it .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.