diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart index b45f4fe0502..e754274a4da 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart @@ -311,7 +311,7 @@ Future buildXcodeProject({ modern: false, ); - final XcodeProjectInfo projectInfo = xcodeProjectInterpreter.getInfo(app.project.hostAppRoot.path); + final XcodeProjectInfo projectInfo = await xcodeProjectInterpreter.getInfo(app.project.hostAppRoot.path); if (!projectInfo.targets.contains('Runner')) { printError('The Xcode project does not define target "Runner" which is needed by Flutter tooling.'); printError('Open Xcode to fix the problem:'); diff --git a/packages/flutter_tools/lib/src/ios/xcodeproj.dart b/packages/flutter_tools/lib/src/ios/xcodeproj.dart index 1f0e0a4f3db..3261776add0 100644 --- a/packages/flutter_tools/lib/src/ios/xcodeproj.dart +++ b/packages/flutter_tools/lib/src/ios/xcodeproj.dart @@ -161,11 +161,11 @@ class XcodeProjectInterpreter { return parseXcodeBuildSettings(out); } - XcodeProjectInfo getInfo(String projectPath) { - final String out = runCheckedSync([ + Future getInfo(String projectPath) async { + final RunResult result = await runCheckedAsync([ _executable, '-list', ], workingDirectory: projectPath); - return XcodeProjectInfo.fromXcodeBuildOutput(out); + return XcodeProjectInfo.fromXcodeBuildOutput(result.toString()); } } diff --git a/packages/flutter_tools/test/src/context.dart b/packages/flutter_tools/test/src/context.dart index 143a791c0f6..9326144e40d 100644 --- a/packages/flutter_tools/test/src/context.dart +++ b/packages/flutter_tools/test/src/context.dart @@ -294,7 +294,7 @@ class MockXcodeProjectInterpreter implements XcodeProjectInterpreter { } @override - XcodeProjectInfo getInfo(String projectPath) { + Future getInfo(String projectPath) async { return XcodeProjectInfo( ['Runner'], ['Debug', 'Release'],