iOS build with broken Universal Link support when exported as ad-hoc and distributed via Firebase App Distribution

We have an app that was being built and distributed to TestFlight for a while. Everything was working fine. But then for multiple reasons we’ve decided to migrate the distribution tooling to Firebase App Tester, which requires a different export method when compiling the .ipa.

We’ve made the changes and we’ve configured a CI/CD pipeline using fastlane to build the app and deploy it automatically to firebase. In summary, we have something like the following:

# build the flutter code to native code
$ flutter build ipa --release --export-method=ad-hoc

# archive to generate the .ipa file (simplified command, we setup it inside the Fastfile)
$ fastlane run gym export_method:"ad-hoc" export_team_id:"<team-id>" skip_build_archive:true

This code works fine, the .ipa file is generated and uploaded to firebase via the firebase_app_distribution lane.

The problem appears after downloading the build from the AppTester app, which for some reason does not respond to universal links anymore – for instance, a link like http://example.com/some-internal-route that used to open the app and redirect for the same code distributed via TestFlight, is not even opening the app anymore.

Has anyone experienced this yet?

After removing the --export-method=ad-hoc and only selecting the ad-hoc profile via fastlane’s gym, the issue with universal link was solved. Not really sure on the root cause here though.