diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart index 6d6ac6b3b93e4..a5523c311629f 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart @@ -480,7 +480,7 @@ Future buildXcodeProject({ } try { - updateShorebirdYaml(buildInfo, app.archiveBundleOutputPath); + updateShorebirdYaml(buildInfo, app); } on Exception catch (error) { globals.printError('[shorebird] failed to generate shorebird configuration.\n$error'); return XcodeBuildResult(success: false); @@ -500,13 +500,13 @@ Future buildXcodeProject({ } } -void updateShorebirdYaml(BuildInfo buildInfo, String xcarchivePath) { +void updateShorebirdYaml(BuildInfo buildInfo, BuildableIOSApp app) { final File shorebirdYaml = globals.fs.file( globals.fs.path.join( - xcarchivePath, + app.archiveBundleOutputPath, 'Products', 'Applications', - 'Runner.app', + app.name ?? 'Runner.app', 'Frameworks', 'App.framework', 'flutter_assets', @@ -514,7 +514,10 @@ void updateShorebirdYaml(BuildInfo buildInfo, String xcarchivePath) { ), ); if (!shorebirdYaml.existsSync()) { - throw Exception('shorebird.yaml not found.'); + throw Exception(''' +Cannot find shorebird.yaml in ${shorebirdYaml.absolute.path}. +Please file an issue at: https://github.com/shorebirdtech/shorebird/issues/new +'''); } final YamlDocument yaml = loadYamlDocument(shorebirdYaml.readAsStringSync()); final YamlMap yamlMap = yaml.contents as YamlMap;