diff --git a/packages/flutter_tools/lib/src/xcode_project.dart b/packages/flutter_tools/lib/src/xcode_project.dart index f00fccd368..eaa3237031 100644 --- a/packages/flutter_tools/lib/src/xcode_project.dart +++ b/packages/flutter_tools/lib/src/xcode_project.dart @@ -262,7 +262,8 @@ class IosProject extends XcodeBasedProject { static final RegExp _productBundleIdPattern = RegExp('^\\s*$kProductBundleIdKey\\s*=\\s*(["\']?)(.*?)\\1;\\s*\$'); static const String _kProductBundleIdVariable = '\$($kProductBundleIdKey)'; - static final RegExp _associatedDomainPattern = RegExp(r'^applinks:(.*)'); + // The string starts with `applinks:` and ignores the query param which starts with `?`. + static final RegExp _associatedDomainPattern = RegExp(r'^applinks:([^?]+)'); Directory get ephemeralModuleDirectory => parent.directory.childDirectory('.ios'); Directory get _editableDirectory => parent.directory.childDirectory('ios'); diff --git a/packages/flutter_tools/test/general.shard/project_test.dart b/packages/flutter_tools/test/general.shard/project_test.dart index 84978ae29f..f9fb84de7e 100644 --- a/packages/flutter_tools/test/general.shard/project_test.dart +++ b/packages/flutter_tools/test/general.shard/project_test.dart @@ -920,6 +920,7 @@ plugins { [ 'applinks:example.com', 'applinks:example2.com', + 'applinks:example3.com?mode=developer', ], ); final String outputFilePath = await project.ios.outputsUniversalLinkSettings( @@ -935,6 +936,7 @@ plugins { [ 'example.com', 'example2.com', + 'example3.com', ], ), );