Closed coolcool1994 closed 1 year ago
I found a few problems with this issue:
@coolcool1994 Could you please specify what version of Firebase you are using.
Looks like you're running into the default universal links behavior. You can override the open-in-app behavior by long-pressing the link and tapping "Open in Safari".
Hi, even when I long-press and tap "Open in Safari", it still opens the app.
FirebaseDynamicLinks (4.0.6):
Firebase version (bet these aren't helpful unless you guys fixed it very recently.)
- Firebase/Analytics (6.14.0):
- Firebase/Core
- Firebase/Auth (6.14.0):
- Firebase/CoreOnly
- FirebaseAuth (~> 6.4.1)
- Firebase/Core (6.14.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 6.1.7)
- Firebase/CoreOnly (6.14.0):
- FirebaseCore (= 6.5.0)
- Firebase/Database (6.14.0):
- Firebase/CoreOnly
- FirebaseDatabase (~> 6.1.3)
- Firebase/DynamicLinks (6.14.0):
- Firebase/CoreOnly
- FirebaseDynamicLinks (~> 4.0.6)
- Firebase/Firestore (6.14.0):
- Firebase/CoreOnly
- FirebaseFirestore (~> 1.8.2)
- Firebase/Functions (6.14.0):
- Firebase/CoreOnly
- FirebaseFunctions (~> 2.5.1)
- Firebase/Messaging (6.14.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 4.1.10)
- Firebase/Storage (6.14.0):
- Firebase/CoreOnly
- FirebaseStorage (~> 3.4.3)
- FirebaseAnalytics (6.1.7):
- FirebaseCore (~> 6.5)
- FirebaseInstanceID (~> 4.2)
- GoogleAppMeasurement (= 6.1.7)
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
- GoogleUtilities/MethodSwizzler (~> 6.0)
- GoogleUtilities/Network (~> 6.0)
- "GoogleUtilities/NSData+zlib (~> 6.0)"
- nanopb (= 0.3.9011)
- FirebaseAnalyticsInterop (1.4.0)
- FirebaseAuth (6.4.1):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 6.2)
- GoogleUtilities/AppDelegateSwizzler (~> 6.2)
- GoogleUtilities/Environment (~> 6.2)
- GTMSessionFetcher/Core (~> 1.1)
- FirebaseAuthInterop (1.0.0)
- FirebaseCore (6.5.0):
- FirebaseCoreDiagnostics (~> 1.0)
- FirebaseCoreDiagnosticsInterop (~> 1.0)
- GoogleUtilities/Environment (~> 6.4)
- GoogleUtilities/Logger (~> 6.4)
- FirebaseCoreDiagnostics (1.1.2):
- FirebaseCoreDiagnosticsInterop (~> 1.0)
- GoogleDataTransportCCTSupport (~> 1.0)
- GoogleUtilities/Environment (~> 6.2)
- GoogleUtilities/Logger (~> 6.2)
- nanopb (~> 0.3.901)
- FirebaseCoreDiagnosticsInterop (1.1.0)
- FirebaseDatabase (6.1.3):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 6.0)
- leveldb-library (~> 1.22)
- FirebaseDynamicLinks (4.0.6):
- FirebaseAnalyticsInterop (~> 1.3)
- FirebaseCore (~> 6.2)
- FirebaseFirestore (1.8.3):
- abseil/algorithm (= 0.20190808)
- abseil/base (= 0.20190808)
- abseil/memory (= 0.20190808)
- abseil/meta (= 0.20190808)
- abseil/strings/strings (= 0.20190808)
- abseil/time (= 0.20190808)
- abseil/types (= 0.20190808)
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 6.2)
- "gRPC-C++ (= 0.0.9)"
- leveldb-library (~> 1.22)
- nanopb (~> 0.3.901)
- FirebaseFunctions (2.5.1):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 6.0)
- GTMSessionFetcher/Core (~> 1.1)
- FirebaseInstanceID (4.2.8):
- FirebaseCore (~> 6.5)
- GoogleUtilities/Environment (~> 6.4)
- GoogleUtilities/UserDefaults (~> 6.4)
- FirebaseMessaging (4.1.10):
- FirebaseAnalyticsInterop (~> 1.3)
- FirebaseCore (~> 6.2)
- FirebaseInstanceID (~> 4.1)
- GoogleUtilities/AppDelegateSwizzler (~> 6.2)
- GoogleUtilities/Environment (~> 6.2)
- GoogleUtilities/Reachability (~> 6.2)
- GoogleUtilities/UserDefaults (~> 6.2)
- Protobuf (>= 3.9.2, ~> 3.9)
- FirebaseStorage (3.4.3):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 6.0)
- GTMSessionFetcher/Core (~> 1.1)
- GoogleAppMeasurement (6.1.7):
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
- GoogleUtilities/MethodSwizzler (~> 6.0)
- GoogleUtilities/Network (~> 6.0)
- "GoogleUtilities/NSData+zlib (~> 6.0)"
- nanopb (= 0.3.9011)
- GoogleDataTransport (3.2.0)
- GoogleDataTransportCCTSupport (1.2.3):
- GoogleDataTransport (~> 3.2)
- nanopb (~> 0.3.901)
- GoogleUtilities/AppDelegateSwizzler (6.4.0):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (6.4.0)
- GoogleUtilities/Logger (6.4.0):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (6.4.0):
- GoogleUtilities/Logger
- GoogleUtilities/Network (6.4.0):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (6.4.0)"
- GoogleUtilities/Reachability (6.4.0):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (6.4.0):
- GoogleUtilities/Logger```
So could anyone set up a dynamic link and make it open the app when pressed, and then try to make it to somehow open it Safari Browser instead? I cannot make this happen - hence this bug report. I programmatically made it as the the flow chart says to open the dynamic link in the browser, but it opens the app every time. I tried every field in manual and REST API dynamic link creation. I think it is a bug
The "Open in Safari" behavior is supposed to be provided by the system, and if it opens Safari successfully then your app's code shouldn't be executed at all. Can you test on a different version of iOS?
Alternatively, you can explicitly call openURL:
in your app to open the URL in Safari (see this Apple doc), but this will "bounce" your user from your app back to Safari and may be undesirable.
I don't want this "bounce behavior", if possible. I am using iOS 13.3.1 . I need it working in iOS 13. Do you think this bug is going to be fixed by you guys at some point? It is just not possible to open dynamic link in Safari right now after you set it up to open in the app, despite what the flow chart says.
If it's a bug in iOS, we have no ability to fix it in the SDK because link opening in Safari should bypass your app completely.
I am not sure if it is a bug in iOS or not, but yea opening in Safari doesn't bypass the app. Thanks for confirming this as a bug of some sort.
I suspect there's something else going on here, since I wasn't able to find a substantial amount of similar reports, which would be expected for a universal linking Apple bug.
Can you try returning false
in your application(_:continue:restorationHandler:)
method? If this doesn't work, can you share a project that reproduces this issue?
When an app is set up to be opened a dynamic link, can you force the dynamic link to open the browser in any apps you know? Or is this just my app? If there some other app that has this working, maybe this is a bug in my project somehow? I don't know what that would be though, but I guess this would point to the right direction.
I can disable dynamic link in my app completely, and yea it would open the browser, but that's not the point. I want to programmatically force it to open the browser when it is set up to open my app. The flow chart says I have programmatically forced it by not specifying bundle ID when creating the dynamic link using REST or manual way, but no luck. Opens app every time.
Returning false in application(_:continue:restorationHandler:)
still opens the app :/ (doesn't even call - (BOOL)application:(UIApplication )application
continueUserActivity:(nonnull NSUserActivity )userActivity
restorationHandler when app is opened after pressing dynamic link)
You can also try to see if you can replicate this behavior in our Dynamic Links quickstart.
Hey @coolcool1994. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
What more info do you need? Once you set up dynamic link to open the app, you cannot configure dynamic link to open a browser, despite the flow chart saying that you can (see the screenshot above). This is a bug. Let me repeat in iOS, you cannot create and configure new the dynamic link to open a browser (when you should be able to, even the flow chart says I can), after the dynamic link is set up to open the app. In my app, I have a webpage that I want users to go to once pressing a specific dynamic link, and it won’t allow me to, at least in the latest iOS 13. I believe none of the dynamic link can open the browser, although flow chart says you can, instead of the app after configured to open the app. Dynamic links always open iOS app if app is installed.
I am having the same issue. on iOS 13 with Firebase 6.26.0
On Android the links work as expected.
@dmandar
Is there any update? Below code creates the dynamic link: https://example.page.link/asdfj, but it always opens the app if the app is installed. Should open the browser!!
const response = await request({ method: 'POST', url: 'https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=API_KEY', body: ({ dynamicLinkInfo: { domainUriPrefix: "https://example.page.link", link: "https:/example.com, navigationInfo: { enableForcedRedirect: false, }, }, suffix: { option: "UNGUESSABLE" } }), json: true }).catch (async (error) => { console.log("sending text message failed " + error); })
![Uploading Screen Shot 2020-09-07 at 5.22.30 PM.png…]()
I have a same issue. The dynamic link was made always open Safari, we didn't set destination to app. But It always open the app!!! not browser!!
It works success at Android.
Firebase Version
- Firebase/Analytics (6.27.0):
- Firebase/Core
- Firebase/Core (6.27.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 6.6.1)
- Firebase/CoreOnly (6.27.0):
- FirebaseCore (= 6.8.0)
- Firebase/Crashlytics (6.27.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 4.2.0)
- Firebase/DynamicLinks (6.27.0):
- Firebase/CoreOnly
- FirebaseDynamicLinks (~> 4.1.0)
- Firebase/Performance (6.27.0):
- Firebase/CoreOnly
- FirebasePerformance (~> 3.1.11)
- Firebase/RemoteConfig (6.27.0):
- Firebase/CoreOnly
- FirebaseRemoteConfig (~> 4.6.0)
- FirebaseABTesting (3.3.0):
- FirebaseCore (~> 6.8)
- Protobuf (>= 3.9.2, ~> 3.9)
- FirebaseAnalytics (6.6.1):
- FirebaseCore (~> 6.8)
- FirebaseInstallations (~> 1.4)
- GoogleAppMeasurement (= 6.6.1)
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
- GoogleUtilities/MethodSwizzler (~> 6.0)
- GoogleUtilities/Network (~> 6.0)
- "GoogleUtilities/NSData+zlib (~> 6.0)"
- nanopb (~> 1.30905.0)
- FirebaseCore (6.8.0):
- FirebaseCoreDiagnostics (~> 1.3)
- GoogleUtilities/Environment (~> 6.5)
- GoogleUtilities/Logger (~> 6.5)
- FirebaseCoreDiagnostics (1.4.0):
- GoogleDataTransportCCTSupport (~> 3.1)
- GoogleUtilities/Environment (~> 6.5)
- GoogleUtilities/Logger (~> 6.5)
- nanopb (~> 1.30905.0)
- FirebaseCrashlytics (4.2.0):
- FirebaseCore (~> 6.8)
- FirebaseInstallations (~> 1.1)
- GoogleDataTransport (~> 6.1)
- GoogleDataTransportCCTSupport (~> 3.1)
- nanopb (~> 1.30905.0)
- PromisesObjC (~> 1.2)
- FirebaseDynamicLinks (4.1.0):
- FirebaseCore (~> 6.8)
- FirebaseInstallations (1.4.0):
- FirebaseCore (~> 6.8)
- GoogleUtilities/Environment (~> 6.6)
- GoogleUtilities/UserDefaults (~> 6.6)
- PromisesObjC (~> 1.2)
- FirebasePerformance (3.1.11):
- FirebaseCore (~> 6.6)
- FirebaseInstallations (~> 1.1)
- FirebaseRemoteConfig (~> 4.4)
- GoogleToolboxForMac/Logger (~> 2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- GoogleUtilities/Environment (~> 6.2)
- GoogleUtilities/ISASwizzler (~> 6.2)
- GoogleUtilities/MethodSwizzler (~> 6.2)
- GTMSessionFetcher/Core (~> 1.1)
- Protobuf (~> 3.9)
- FirebaseRemoteConfig (4.6.0):
- FirebaseABTesting (~> 3.1)
- FirebaseCore (~> 6.8)
- FirebaseInstallations (~> 1.1)
- GoogleUtilities/Environment (~> 6.2)
- "GoogleUtilities/NSData+zlib (~> 6.2)"
- Flurry-iOS-SDK/FlurrySDK (10.3.3)
- GoogleAppMeasurement (6.6.1):
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
- GoogleUtilities/MethodSwizzler (~> 6.0)
- GoogleUtilities/Network (~> 6.0)
- "GoogleUtilities/NSData+zlib (~> 6.0)"
- nanopb (~> 1.30905.0)
- GoogleDataTransport (6.2.1)
- GoogleDataTransportCCTSupport (3.2.0):
- GoogleDataTransport (~> 6.1)
- nanopb (~> 1.30905.0)
- GoogleToolboxForMac/Defines (2.2.2)
- GoogleToolboxForMac/Logger (2.2.2):
- GoogleToolboxForMac/Defines (= 2.2.2)
- "GoogleToolboxForMac/NSData+zlib (2.2.2)":
- GoogleToolboxForMac/Defines (= 2.2.2)
- GoogleUtilities/AppDelegateSwizzler (6.6.0):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (6.6.0):
- PromisesObjC (~> 1.2)
- GoogleUtilities/ISASwizzler (6.6.0)
- GoogleUtilities/Logger (6.6.0):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (6.6.0):
- GoogleUtilities/Logger
- GoogleUtilities/Network (6.6.0):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (6.6.0)"
- GoogleUtilities/Reachability (6.6.0):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (6.6.0):
- GoogleUtilities/Logger
Test Device
iOS 13.6.1 iPhone SE (2th generation)
My Dynamic Links Debug
Same problem. Deep link always opens ios app if it's installed even though the chart shows it should open web. Only specified parameters are: domainUriPrefix, link and socialMetaTagInfo.
I am having the same issue.
We have used Firebase/DynamicLinks (6.32.0). Same issue present in this version too. Let us know when this issue get fixed.
Same issue
So i was facing this problem, but i was able to force web regardless of install state and device, but this was in the context of manual link creation by aligning ofl and afl with the destination link and just unsetting/nil setting for ibi etc.
Now that i think about it though, what does this have to do with firebase? In my case, i configured universal links, purpose being i can use a single www URI to serve native and www content. Obviously though, like a lot of you i'm sure, don't have one to one parity between both platforms, but thats OK, firebase is offloading those for me.
The problem is, i'm trying to go a web landing, with a domain i explicitly defined as universal link, which by design is just doing what i told it to. I pulled https://my.destinationhost.com/.well-known/apple-app-site-association
of the host of the destination i'm trying to link to and configuration literally says ALL links should go to app. My guess is if i add the path/routes of the webpage i only want/can serve by www, it will work as expected. Have you guys confirmed that your destination is not a universal link or if it is, telling apple/ios that this particular destination is not intended to be consumed by the native app?
{
"applinks": {
"details": [
{
"appIDs": [ "prod-foo-bar", "staging-foo-bar" ],
"components": [
{
"/": "/*",
"comment": "Matches any URL"
}
]
}
]
},
}
aka, iMessage yourself the final destination link, without an FDL, and tap on it. If you have multiple environments, make sure the correct app is installed (it's easy to forget what associated domains you actually have in your entitlement) If it opens the installed app, thats a configuration error.
I am facing the same issue? Is this not possible in iOS and what could be a workaround?
My app is having the same problem. If user installed the app, and open the SHORT dynamic link (domain.page.link/abcZYZ), then app will be opened but dynamicLink.url
is just nil.
I have to say, if Dynamic Links is configured properly, then Associated Domains will contain applinks:<domain>.page.link
, and in normal universal link behavior, the app SHOULD be opened when user taps on any domain.page.link
url, even the short or long one. And it did.
The problem here is:
dynamicLink.url
is delivered.dynamicLink.url
is nil.Firebase SDK should resolved the short URL before give it to the app, isn't it? Is this code block resolve domain.page.link/abcd
into domain.page.link?url=https://example.org
?
let handled = DynamicLinks.dynamicLinks().handleUniversalLink(userActivity.webpageURL!) { (dynamiclink, error) in
// ...
}
I am facing the same issue? Is this not possible in iOS and what could be a workaround?
You can use an additional URL prefix
for links that need to open only in the browser
The issue happens because when you create an FDL and if your firebase project contains iOS apps, the AASA file generated for the FDL contains the details of the apps added to the firebase project even if you select browser for opening the FDL. Because of which if the user tries to open the link when the app is installed, the universal linking will take over and opens up the app.
we are already aware of this issue and the fix for the same is in our roadmap.
Hi - any update on this issue @eldhosembabu ? We are still running into this issue - thanks.
unfortunately we don't have any updates as of now.
Any updates on this, it is still a problem?
The Firebase Dynamic Links service will be shutdown on August 25, 2025. In the meantime, only critical or security issues will be fixed in the SDK.
More at https://firebase.google.com/support/dynamic-links-faq
I tried them all: REST API and manual construction. You cannot create dynamic link that would open the web broswer if the app is installed - it will always open the app. I get a previewLink after successfully creating dynamic link, and that flow chart shows that just created dynamic link should open browser:
But it doesn't. It never does. It always open the installed app, never the website.
To reproduce, try to force create short link from dynamic link to open web browser in a mobile device that has the app installed. You can't. Dynamic link opens the app instead 100% of the time, and there is no way to force it to open web browser - this is contrary to what the flow chart says. There is no field whatsoever (tried them all in REST API and manual construction) that you can use to make programmatically created dynamic link to open browser. It is so funny because when you create short link from the dynamic link in the console, you can specify how it will behave, but it is impossible to do this when creating short link using REST API and manual construction. Please fix.
When not specifying bundle id for the apps when creating dynamic link, the created short link should open website, and not the app. Right now iOSInfo field or apn (in manual construction) are just obsolete/useless fields. Tested in mobile iOS environment (Haven't tested in Android).