0

I had already connected the free custom page.link subdomain and this works great and as expected. It opens my app and redirects users to the specific pages. However, I recently got a custom domain from google domains and wanted to connect it. the domain is https://gifte.app

I connected it to my projects associated domains : applinks:gifte.app and another link : applinks:gifte.app/applinks

In the firebase console I also added https://gifte.app and added https://gifte.app/applinks

when adding the first one, it told me to add some lines to the DNS settings which I did. And when adding this one https://gifte.app/applinks firebase told me to add

"appAssociation": "AUTO",

"rewrites": [ { "source": "/applink/**", "dynamicLinks": true } ]

to firebase.json which I added and is in my project directory.

when creating a dynamic link. I used

DynamicLinkComponents.init(link: linkParameter, domainURIPrefix: "https://gifte.app/applinks")

and created the link the way shown in the firebase tutorial videos. Running the project and trying to create the dynamic link. I get this error

Error Domain=com.firebase.durabledeeplink Code=0 "Your project does not own Dynamic Links domain: https://gifte.app

however when using https://gifte.page.link I do not get the error and it works fine.

When using https://gifte.app instead as the domainURIPrefix, the dynamic link is generated. however when it is clicked in the notes app. It doesnt redirect to the app. It instead redirects me to a 404 ERROR

This file does not exist and there was no index.html found in the current directory or 404.html in the root directory.

Why am I seeing this? You may have deployed the wrong directory for your application. Check your firebase.json and make sure the public directory is pointing to a directory that contains an index.html file.

You can also add a 404.html in the root of your site to replace this page with a custom error page

In summary of creating the links

So my question is, how can I get the custom dynamic links working the same as the free page.link subdomain? I don't get why adding the custom domain has caused so many problems and why using https://gifte.app/applinks gives an error saying that I do not own the domain.

my firebase.json file

{
"functions": {
"predeploy": [
  "npm --prefix \"$RESOURCE_DIR\" run lint"
],
"source": "functions"
},
 "hosting": {
 "public": "public",
 "ignore": [
   "firebase.json",
   "**/.*",
   "**/node_modules/**"
 ],
 "appAssociation": "AUTO",
 "rewrites": [ { "source": "/applink/**", "dynamicLinks": true } ]
 }
}

Does anyone have a solution? Thank you.

Andrew Harris
  • 396
  • 7
  • 24
  • I just went through this process myself and got it working. Are you able to post your firebase.json file? – HondaGuy Mar 21 '19 at 19:01
  • yeah I can post this. 3rd URL, the one that I am trying to use was different from the one in firebase.json. It was 'applink' not 'applinks' changing this inside my project removed the error saying I didn't own the domain. However on clicking the generated domain in notes. It doesn't open the application like with page.link, it opens the firebase page which says install app etc – Andrew Harris Mar 22 '19 at 10:48
  • Have you confirmed that you are using version 6.5.0 of firebase-tools to deploy? This is a problem I ran into because on 6.4.0 it fails silently. Hosting rewrites for FDL weren't implemented in firebase-tools until 6.5.0. – HondaGuy Mar 22 '19 at 17:06
  • @HondaGuy running firebase tools --version says I am using version 6.5.0. Could It be the fact that my application is not on the app store yet? I am using google photos as the applicationID as said on the firebase tutorial – Andrew Harris Mar 23 '19 at 14:17
  • Not sure on whether it will matter whether your app is in the store or not. In either case, you should be able to to just add the `?d=1` querystring arg to the dynamic link and get the breakdown of how it will behave on different devices. – HondaGuy Mar 26 '19 at 16:45
  • @AndrewHarris I am also facing the same problem. Actually I have two iOS apps in the same firebase project. And I want the links to be handled by separately, So I have also placed an apple-app-site-association file in the root directory. Can you please share the code to generate dynamic link with url prefix – Ali M Irshad Dec 12 '19 at 08:10

0 Answers0