-
Most of the literature I find online, including one on react-native-firebase, explains how one handles an incoming dynamic link when the app was already installed. On Android it will already "open" the dynamic link and pass the value which is above under The params we care about are contained in I created a front + background listeners as follows: const handleDeepLink = useCallback(
async (link: FirebaseDynamicLinksTypes.DynamicLink | null) => {
// Is link going to be the same as in deep_link_id if the app was just installed via the iOS app store?
...
},
[]
);
useEffect(() => {
const unsubscribe = dynamicLinks().onLink(handleDeepLink);
return unsubscribe;
}, [handleDeepLink]);
useEffect(() => {
dynamicLinks().getInitialLink().then(handleDeepLink);
}, [handleDeepLink]); You can see my question in the code above: If we were redirected to the app store, installed the app and it opened it with the url containing Until recently I handled it without react-native-firebase and first parsed the link, then did const parsedURL = Linking.parse(url);
if (parsedURL.queryParams?.deep_link_id) {
...
} So maybe I can avoid this with react-native-firebase? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I'm not sure I understand, but I think the resolveLink method will handle anything you throw at it, removing consideration of "what's my link like?" - I wrote it for that purpose https://rnfirebase.io/reference/dynamic-links#resolveLink If I do understand, then my understanding of deep links indicates you should get the actual deep link I think you can get a flowchart with details via methods described here: https://firebase.google.com/docs/dynamic-links/debug Thinking less speculatively, why guess, try it, does it not work for you? |
Beta Was this translation helpful? Give feedback.
-
Thanks Mike! I definitely need to test it out, but it's nice to know that in theory it should work as I expect it to. |
Beta Was this translation helpful? Give feedback.
I'm not sure I understand, but I think the resolveLink method will handle anything you throw at it, removing consideration of "what's my link like?" - I wrote it for that purpose https://rnfirebase.io/reference/dynamic-links#resolveLink
If I do understand, then my understanding of deep links indicates you should get the actual deep link
I think you can get a flowchart with details via methods described here: https://firebase.google.com/docs/dynamic-links/debug
(not totally related but somewhat related, v14.10.x implemented the
performDiagnostics
method for iOS, though I don't think it addresses your exact question)Thinking less speculatively, why guess, try it, does it not work for you?
…