4

How to Open an iOS App using Firebase Dynamic Links and Pass or get Parameters To an App Via Custom URL Scheme in iOS(swift)?

for eg :- https://q3tyj.app.goo.gl/abcd

My URL Scheme is ‘q3tyj.app.goo.gl’ in iOS app in Url Types.


If I type q3tyj.app.goo.gl in safari, I am able to open the application. But if I type q3tyj.app.goo.gl with some extra parameter like https://q3tyj.app.goo.gl/abcd in safari, , I am not able to open the application.



please also explain me how to get “link” parameter (which associated with dynamic link) from dynamic link in iOS app ( Swift ) .



I followed steps which were mentioned in Firebase.google.com for iOS ( Swift ).but its not working.

Thanks, Nirav Virpara

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Nirav Virpara
  • 43
  • 1
  • 3
  • The custom URL scheme is the bit that replaces the https:// and not the name of the website. Please edit your example code, or fix it, as appropriate. – AlBlue Jun 25 '16 at 12:04
  • Hello Frank, Thanks for your reply. if i set custom URL scheme = bundleid and type bundleid:// in browser then App is open. But if i type firebase dynamic links 1) Short Url : https://q3tyj.app.goo.gl/5yR3 OR 2) Long Url : https://q3tyj.app.goo.gl/?link=https://photopzzlv1.firebaseio.com/puzzle1&ibi=bundleid then app is not open. Waiting for your response. Thanks, Nirav Virpara – Nirav Virpara Jun 27 '16 at 07:31
  • Did you get anywhere with this? I am having a similar issue: (1) URL clicked from Gmail mobile site running in Chrome: app launches (on iOS 10) correctly and gets full deeplink URL (2) URL clicked from Gmail mobile site running in Safari: app launches (on iOS 10) correctly and gets deeplink, BUT NOT URL (3) URL clicked from Apple Mail app: app launches (on iOS 10) correctly and gets deeplink, BUT NOT URL – Tim Closs Apr 07 '17 at 12:52

2 Answers2

8

It's hard to know exactly where your error is, but a few things to help you debug:

  1. If you go to https://q3tyj.app.goo.gl/apple-app-site-association, you should see some JSON that points to your app. If you don't see this, make sure you've entered your team ID and your App Store ID in the project settings in the Firebase console

  2. Make sure you're using your Bundle ID, not the shortlink domain, as your custom URL scheme in Xcode

  3. Make sure you've enabled Associated Domains in the Capabilities tab of your Xcode project, and your domain looks like applinks:q3tyj.app.goo.gl

  4. Universal Links (and, therefore, Dynamic Links) generally don't work if you type them directly into the Safari address bar. Instead, try typing the URL into an app like Notes and then clicking on them from there.

Good luck!

Todd Kerpelman
  • 16,875
  • 4
  • 42
  • 40
  • Hello Todd, Thanks for reply. As you mentioned above , I followed all steps. only one thing is missing that is App Store Id. because I am still working on app. I haven’t uploaded app on App store till now. So , Is it possible that this could work with out App Store ID ? when i open the URL via browser it should take me to the Application and not to the Firebase console. Waiting for your reply . Thanks, Nirav Virpara – Nirav Virpara Jun 27 '16 at 05:43
  • I want to share Url to other Users , so which Url should i use ? 1) Short Url : https://q3tyj.app.goo.gl/5yR3 OR 2) Long Url : https://q3tyj.app.goo.gl/?link=https://photopzzlv1.firebaseio.com/puzzle1&ibi=bundleid – Nirav Virpara Jun 27 '16 at 05:45
  • Hello Todd, my idea is User will share Firebase dynamic link via any social media to their friends and friend will get that link and when user will click on link then app will open and app will parse firebase link and get data from firebase and store in app local database. Waiting for solution my query. Thanks, Nirav Virpara – Nirav Virpara Jun 27 '16 at 09:51
  • Thx a lot man, saved my day, Literally didnt think to copy link in another browser and its working.... it mean dont rely on safari while testing dynamic links. :) – Mr.Javed Multani Nov 20 '17 at 10:51
  • I am trying to create a firebase dynamic link programmatically, but I get odd result. Could you please read my question? Many thanks https://stackoverflow.com/questions/50570676 – bibscy May 28 '18 at 18:31
  • hi, i am facing a strange error in firebase dynamic linking, Please help if you have a solution. dynamic link working fine when the app is already installed. I send user id with dynamic link all working when app is install. when I app is not install its take me on preview page then i click on open, it take me on play store where i install the app but and open it its link not working and i am not getting user id – Muhammad Ahmad Apr 12 '21 at 07:10
  • already test these steps... 'apple-app-site-association' Its show me the app id association domain set into code and enable call function double-checks into app delegate opens ur and scene delete user activity... team id and app id is set here is the code – Muhammad Ahmad Apr 12 '21 at 07:20
  • hi I am facing the same error please check the link below help me if you have a solution stackoverflow.com/q/67019905/11468227 – Muhammad Ahmad Apr 12 '21 at 07:30
0

If you type https://q3tyj.app.goo.gl/apple-app-site-association this link in your browser and check, you will end up seeing a json, meaning your apple-app-site-association is correctly configured on your google website. However, you need to make sure that teamid in your google console or appid is correct.

  • hi I am facing the same error please check the link below help me if you have a solution stackoverflow.com/q/67019905/11468227 – Muhammad Ahmad Apr 12 '21 at 07:30