-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛] Dynamic Links (iOS) getInitialLink() always returning null - Multiple environments #8150
Comments
🤔
That's pretty dated - I encourage you to reproduce this on up to date versions before filing issues, that said, this is not something that we have a lot of control over at this level, our dynamic link resolution delegates to firebase-ios-sdk pretty purely for these APIs Have you tried reproducing with some native app logging using a native quickstart? That would allow you to access support where you will most likely need it - in the firebase-ios-sdk repository --> https://github.com/firebase/quickstart-ios/tree/main/dynamiclinks usually those allow for a reproduction pretty quickly from checkout to some quick modifications hacked in for your test to reproducing it... |
I can confirm what I have seen with similar behavior: This will also work if you just download the app (but don't open it) and then click on the link. For myself I created a small “proxy hack” under the dynamic links implementation, which for the first application launch within 1000ms collects links from onLink and returns the received link to getInitialLink. This turned out to be the easiest, since dynamic links will soon be disabled and we are ready to switch to our own solution. I hope this will be helpful to someone. |
@mikehardy we tried using the https://github.com/firebase/quickstart-ios/tree/main/dynamiclinks and everything worked as expected. We've updated to version |
I had a use case a long time ago where I wanted to resolve links directly (like, after scanning a QR) and implemented a direct resolution method in #3814 - so now I use the 1-2 combo of:
If you are getting null, perhaps the app has not pulled down the links definitions or similar yet? I'm not sure - but the platform API has to return the link, right? And if it is a link, then direct resolution has to work, right? Hopefully that helps? |
@mikehardy I was pointing on that exact direction! But figured out that https://reactnative.dev/docs/linking#getinitialurl also returns My question is:
|
it may be that the link is consumed somehow prior to you getting it where ever you are currently focusing on it? I don't have any really solid ideas unfortunately, it could be so many things and dynamic links itself is going away Did you try the resolveLink style to see if that works as a workaround? it's what I have at the moment in my production app |
I was trying to use that but even getInitial link from react native is returning null so I don't have an actual URL to resolve to. Firebase folks recommends using SceneDelegate. This still doesn't explains why debug link works and beta/production links doesn't. |
Issue
Describe your issue here
Description:
We are experiencing an issue where Firebase Dynamic Links no longer work as expected on iOS. When using a dynamic link generated from the Firebase Console, such as:
https://taxfix.page.link/document-manager
(which resolves to https://app.taxfix.de/dlink/document-manager),
the app opens successfully, but calling the getInitialLink method returns null. Previously, getInitialLink would correctly return the deep link URL (https://app.taxfix.de/dlink/document-manager). This behavior stopped working a few days ago and now consistently fails in all cases.
Context:
We have three Firebase Dynamic Link domains set up:
Debug:
Domain: https://taxfixdebug.page.link
Links resolve to our DEBUG application.
Beta:
Domain: https://taxfixbeta.page.link
Links resolve to our BETA application (published on Testflight).
Production:
Domain: https://taxfix.page.link
Links resolve to our Production application (published on stores).
The issue primarily affects the Beta and Production environments. Debug links work perfectly when running our application locally.
Platform-specific Behavior:
iOS: The issue occurs for Beta and Production dynamic links. While the app opens as expected, the getInitialLink method fails to return the link and instead returns null.
Android: Dynamic links work as expected across all environments (Debug, Beta, and Production).
Additional Notes:
This issue appears to be specific to iOS. It seems unrelated to link configuration, as everything worked correctly until a few days ago. We would appreciate any guidance or suggestions to debug or resolve this behavior.
Project Files
Javascript
Click To Expand
package.json
:#
firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
ios/Podfile
:AppDelegate.swift
:Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:19.3.0
Firebase
module(s) you're using that has the issue:@react-native-firebase/dynamic-links
TypeScript
?Y
&5.5.4
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: