Firebase Dynamic Links are not working on Flutter IOS

66 Views Asked by At

I have integrated Firebase Dynamic Links into my Flutter app. The feature works just fine on Android but it does not work on the IOS app. I can't generate links (it returns null). When I open the generated link from the android app, I get this warning

iOS app '234' lacks App ID Prefix. UniversalLinks is not enabled for the app. Learn more.

and that is linked to the documentation of the absence of team ID.

This is the AASA file generated by Firebase

{"applinks":{"apps":[],"details":[{"appID":"teamID.com.company.appname","paths":["NOT /_/*","/*"]}]}}

Info.plist file

<array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>Bundle ID</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>com.company.appname</string>
            </array>
        </dict>
    </array>
    <key>CFBundleVersion</key>
    <string>$(FLUTTER_BUILD_NUMBER)</string>
    <key>FirebaseDynamicLinksCustomDomains</key>
    <array>
        <string>https://mylink.com/link</string>
    </array>

code for creating the link

      print('$_baseUrl$path?$queryParam=$value');
      var parameters = DynamicLinkParameters(
        uriPrefix: _baseUrl,
        link: Uri.parse('$_baseUrl$path?$queryParam=$value'),
        androidParameters: const AndroidParameters(
          packageName: 'com.company.appname',
          minimumVersion: 0,
        ),
        iosParameters: const IOSParameters(
            bundleId: 'com.company.appname',
            minimumVersion: '0',
            appStoreId: 'appstoreid'),
      );
      final shortLink =
          await FirebaseDynamicLinks.instance.buildShortLink(parameters);
      var shortUrl = shortLink;
      print('short link ==== ${shortUrl.previewLink.toString()}');
      return shortUrl.previewLink.toString();

I double-checked the team ID and app store ID of the app, and both are correct. Any idea what might be the issue here?

0

There are 0 best solutions below