llfbandit / app_links

Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter.
https://pub.dev/packages/app_links
Apache License 2.0
220 stars 81 forks source link

When app_links is used with firebase, IOS fails to obtain deepLink. #168

Open Sansuihe opened 2 weeks ago

Sansuihe commented 2 weeks ago

**flutter version 3.22.2;

app_links: ^6.1.3

firebase_core: ^3.6.0**

bug:When I used firebase for flutter project and needed to do deepLink special processing by myself, everything was normal on Android platform using app_links, but on ios platform deepLink started the App normally but could not normally get the url of the launch listener callback.

[[FirebaseAnalytics]] 11.2.0 - [FirebaseAnalytics][I-ACS023001] Deep Link does not contain valid required params. URL params: {
    index = 0;
}

In this error message, Firebase got my deeplink parameter, but the app_links listener got no feedback

Sansuihe commented 2 weeks ago

Check your source code I found using AppLinks. Shared. HandleLink can give flutter listener callback as a result, and then I made the following treatment in ios can as I expected received app_links listener callback。

   override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
       AppLinks.shared.handleLink(url: url)
   }