12

I have two apps that need to communicate through a deep link: A Flutter Web Application and a Flutter Mobile App on iOS.

Basically, the flow needs to be that I click a button in the Web app running on a mobile browser, which is then supposed to trigger the mobile app to launch.

I've followed the specified instructions for setting up deep links and have 2 observations:

  1. Everything works perfectly on Android.
  2. If I tap on the link in any other iOS app (Calendar, MS Teams, etc.) it works perfectly fine. This leads me to believe that the deep linking has been setup correctly.

The issue i'm facing is that I need to get the link to work from my WebApp.

I'm using the Flutter url_launcher package to open the link with the launch() function.

Does anyone have any insights on what I would need to do to get the deep linking working from the iOS browsers? Any help would be appreciated. :(

Flutter code from my WebApp that I'm using to launch the url:

final urlToLaunch = Uri.encodeFull(
    'https://url-to-my-app'
);
await launch(
  urlToLaunch,
  universalLinksOnly: true,
);

I haven't shared much code because I'm not sure what would be useful.

2 Answers2

1

Deep link

Use this flutter package uni_links

Try to use deepLink i.e instead of https:// use custom scheme myownscheme://

await launch(
 'myownscheme://example.com/path?q1=v1&q2=v2',
  universalLinksOnly: false,
);
Bharath
  • 1,036
  • 10
  • 13
0

The ultimate solution is to use Firebase Dynamic Links.

Dynamic Links are smart URLs that allow you to send existing and potential users to any location within your iOS or Android app. They survive the app install process, so even new users see the content they're looking for when they open the app for the first time. Dynamic Links are free forever, for any scale.

Please check this article for more info on Dynamic Links https://levelup.gitconnected.com/handling-dynamic-links-using-flutter-and-firebase-2be5f6a85e1f

Baimam Boukar
  • 908
  • 5
  • 20