Skip to content

🐛 [firebase_dynamic_link] New iOS install doesn't open with dynamic link after install #7546

Closed
@badrobot15

Description

@badrobot15

Bug report

Dynamic Link returns null
On latest version of 4.0.2, for fresh app installs from a dynamic link in iOS via AppStore, the link isn't received in Flutter App. On clicking the link, the app store page opens as required, but after the user downloads the app, the dynamic link within the app seems to be null. Now if having the app already installed on the phone, on clicking the link, the app successfully gets the link. While this behavior is fine for users who already have the app, it totally ruins the experience for new users.

Additional context

Found a similar problem at issue #1861 but that seems to have been closed with the only solution being restart the phone and then install. Since the only way we are able to reproduce the bug is after deploying it to production on app store, it is quite difficult to debug and find the problem.

         final _appLinks = AppLinks(
         onAppLink: (Uri deepLink, String dataStr) async {
           
           if (deepLink == null) return false;

           pendingDynamicLinkData = await FirebaseDynamicLinks.instance.getDynamicLink(deepLink);
           actualDeepLink = pendingDynamicLinkData.link ?? null; 

           if (actualDeepLink == null) return false;
           .
           .
           .
           .
           return true;

         },
       );

As per #6913 I had to use AppLinks to get the link for iOS only.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions