Firebase Dynamic links - when clicked not working in iOS - ios

Im using firebase dynamic link to open the mobile application (If already installed) or to redirect user to Playstore or app store.
In iOS mobile , I pasted the link in notes / messaging apps and while clicking the link it Opens the safari browser and it shows the Preview page. Upon clicking the "Open" button in preview page , it says "Safari cannot open the page because the address is invalid".
Can you please help me with this?
Note : In same iOS device , when I set the default browser to chrome and then clicking the Link opens the app correctly.

Finally I am able to resolve the issue.
The initial step is to create a universal link in Firebase console.
Once the universal link is created , we have to do following changes in XCode:
Enable associated domains under capablities
Include URL types
Must verify your Team ID that you would have provided in firebase console.
Once the universal link setup is completed in Xcode, we can do build and run and check the working of Universal link.
i.e. clicking the link should open the app (provided app is already installed).
and it should not open the safari browser.
If clicking the link opens safari browser , then there is a problem with the Universal link setup.
The below tutorial is very useful:
https://youtu.be/KLBjAg6HvG0

Related

How to force to open app by Universal Link in Swift likes iOS Notes app

I run into an issue with Universal Link that once the Universal Link is opened by Safari, it won't able to open by its app.
Seem iOS does remember the last app used to open the link.
But when I copy the link into iOS Notes app, long-press, select Open in "App Name" and the issue is gone! (Check the screenshot)
Does anybody know how to force to open an app like iOS Notes app?
Or does anybody know how to check whether the URL has been remembered to open by Safari by iOS?
I did try by open(_:options:completionHandler:) & specific options [.universalLinksOnly: true] but it doesn't work
Thanks all 🙏🏿
This article may help.
When a user browses your website in Safari and taps a universal link in the same domain, the system opens that link in Safari, respecting the user’s most likely intent to continue within the browser. If the user taps a universal link in a different domain, the system opens the link in your app.

Deep Links Redirection error in iOS - "Safari cannot open the page"

This is sudip here, we've implemented branchio in our app and in website. We're facing an issue in ios 10.3, whenever we open link in ios 10.3 it shows error "safari cannot open the page, the address is invalid", and in background we have our banner which says get the app.
if we click on cancel on confirmation in safari during popup "Do you want to open this in app", it starts showing "safari cannot open the page, the address is invalid"
how can we resolve the above issue
Product Category Links Redirection
Settings for used in link settings of branch dashboard
URI Scheme Deep Link Mode : Intelligent,
Enabled Universal & App Links for both iOS & Android,
We've tested in:
Android - Opened links from hangout, working smoothly
IPhone CE , iOS version 10.3.3 : Opened links from hangout, using safari browser, shows error "Safari cannot open the page"
IPhone SE , iOS version 10.3.3 : Opened links from hangout, using safari browser, shows error "Safari cannot open the page"
Link(s) for Testing
https://link.onference.in/ZsSH9R6uAU
First step is please go to settings-> safari -> Clear History and website data and the check the link, if its not working then you need to check the settings in info.plist and Associated Domains
This alerts usually happens for users who do not have the app on their device when we try to use the iOS URI scheme because the universal link for your app fails. To give better assistance, can you please validate if your universal link setting in your iOS app is correct by our validation tool and give us your result? Also, you can find common issues that cause universal links to fail here.
Please do reach out at integrations#branch.io if you have any further questions!

Firebase's Dynamic Link on iOS only works opening the link using Chrome

I configured my iOS App to handle a Dynamic Link I created using Firebase. So if I copy the generated link and paste it in Chrome's address bar, it works correclty: I get redirected to a preview page for my app with a button. Tapping on the button will open the store if I don't have the app installed, or open the app if it's already installed. When pasting the link in Safari's address bar, I get reidirected to the same page, but when I tap on that button, I am always redirected to the store, even if the app is already installed, instead of launching the app. Any clue about why this happens?

Open iOS application from universal links

I have implemented universal links in my application by uploading "apple-app-site-association" to my server and enabling "associated domains" in my project(by adding applinks). My app opens whenever I click on my server weblink from Safari browser.
1) Its not working on any other browser
2) I need to open my app from other apps as well, i.e. Instagram, Twitter etc.
How can I achieve the above scenarios using universal links. If not, is there any other way of achieving the same.
Not all apps will open universal links in you app. You can read a little more here:
"Pasting a Universal Link directly into the Safari URL field doesn’t cause the app to open automatically. If you do this, you will have to manually pull the website down so that a prompt will appear at the top asking you to open the respective app.
But, if you paste links in Facebook(app), Twitter(app), Mail(app) or even if you go to Facebook on Safari and then click on a universal link, the app opens directly.
Universal links will not works for all the apps in iOS. If you click on a universal link from any of the “BLACK LISTED” apps, it will not open the app. Go to this link to know more.
As in step one, for the first time you will have to manually pull down the website and click “open” to open the link using the respective app. The iOS will “remember” to open the app instead of opening the safari if the universal link with the registered domains are clicked."
https://medium.com/#abhimuralidharan/universal-links-in-ios-79c4ee038272
https://docs.branch.io/pages/deep-linking/universal-links/#appsbrowsers-that-support-universal-links

iOS 9 Universal Links not launching the app from the same domain

I have setup my AASA JSON file to open the app when someone visits myDomain.com/ShowInTheApp/*
This works from Notes App, Email, Gmail App, Gmail web on safari and basically any other websites other myDomain.com .
When myDomain.com/chooseAppORweb.html contains a link to myDomain.com/ShowInTheApp/ , safari always opens it in the same tab, app wont get launched. I can tap and hold the link to show the context menu that contains an entry "Open In [My app name]" which will indeed launch my app. But not by single tapping on the link.
When I do the exact same steps from another domain, NOTmyDomain.com/chooseAppORweb.html always launches the app without issues.
Has anyone succeeded in launching the app consistently from the same domain using UL ?
Also, if there is an Apple's document that explains any of these behaviours, please share the link.
I'm not sure when Apple added this to their documentation, but it's explained on their Support Universal Links page, in the first note:
In iOS 9 and later, universal links let users open your app when they tap links to your website within WKWebView and UIWebView views and Safari pages, in addition to links that result in a call to openURL:, such as those that occur in Mail, Messages, and other apps.
When a user is browsing your website in Safari and they tap a universal link to a URL in the same domain as the current webpage, iOS respects the user’s most likely intent and opens the link in Safari. If the user taps a universal link to a URL in a different domain, iOS opens the link in your app.
For users who are running versions of iOS earlier than 9.0, tapping a universal link to your website opens the link in Safari.
(Emphasis added)
Essentially, once a user reaches a page hosted on your domain in Safari, any links they follow on your domain will be opened in Safari, even if they're defined as Universal Links by your app.
As st.derrick mentioned above, this is the in-place behavior for Universal links. If you have previously been taken to the App from the link, but then choose to be taken to the website when prompted with a long press, the functionality to open the App will break. You can remedy this by long-pressing again and choosing to open in-app. It's not an ideal solution, but it is the only way I've seen it be fixed. I hope this helps!

Resources