Flutterfire: [firebase_dynamic_links] links are only detected if end in page.link on IOS

Created on 22 Mar 2020  路  4Comments  路  Source: FirebaseExtended/flutterfire

Describe the bug

On IOS, FirebaseDynamicLinks.instance.onLink() is not triggered unless the dynamic link ends in page.link. Android works fine.

To Reproduce
Steps to reproduce the behavior:

  1. Create a branded dynamic link domain in the firebase console (mine is app.heloai.com)
  2. Complete ios setup steps in installation instructions
  3. Run the example code on an ios device/simulator
  4. Minimize the app
  5. Open a dynamic link
  6. FirebaseDynamicLinks.instance.onLink() is not triggered

Expected behavior
The example code's onLink listener is triggered.

Additional context
I am using this package in production and want to use more professional looking links.

customer-response bug

Most helpful comment

This is not broken, but make sure you're putting:

<key>FirebaseDynamicLinksCustomDomains</key>
    <array>
        <string>https://app.heloai.com</string>
        </array>

in your Info.plist in addition to adding an Associated Domain of applinks:app.heloai.com. IIRC, the setup instructions omit the FirebaseDynamicLinksCustomDomains part.

All 4 comments

I can confirm that this is happening in iOS. In my case, if I do not use page.link and use custom url, dynamic link does not work at all in iOS. App opens fine, but parameter information gets lost.

However, if I use page.link, things seem to be working as expected.

Hi @opringle
can you please provide your flutter doctor -v ,
your flutter run --verbose
and your pubspec.yaml
or if possible a reproducible minimal code sample.
Thank you

This is not broken, but make sure you're putting:

<key>FirebaseDynamicLinksCustomDomains</key>
    <array>
        <string>https://app.heloai.com</string>
        </array>

in your Info.plist in addition to adding an Associated Domain of applinks:app.heloai.com. IIRC, the setup instructions omit the FirebaseDynamicLinksCustomDomains part.

@blaneyneil Thanks. That fixed my issue. The dart firebase_dynamic_links setup instructions should be updated with this information.

https://pub.dev/packages/firebase_dynamic_links

The firebase official document does have that piece of information.

https://firebase.google.com/docs/dynamic-links/custom-domains

Was this page helpful?
0 / 5 - 0 ratings