Unverified Commit 4d5db889 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Default add-to-app xcode_backend script to be verbose (#73110)

parent 062022b9
......@@ -305,8 +305,8 @@ Future<void> main() async {
);
section('Fail building existing Objective-C iOS app if flutter script fails');
final int xcodebuildExitCode = await inDirectory<int>(objectiveCHostApp, () =>
exec(
final String xcodebuildOutput = await inDirectory<String>(objectiveCHostApp, () =>
eval(
'xcodebuild',
<String>[
'-workspace',
......@@ -315,7 +315,7 @@ Future<void> main() async {
'Host',
'-configuration',
'Debug',
'ARCHS=i386', // i386 is not supported in Debug mode.
'FLUTTER_ENGINE=bogus', // Force a Flutter error.
'CODE_SIGNING_ALLOWED=NO',
'CODE_SIGNING_REQUIRED=NO',
'CODE_SIGN_IDENTITY=-',
......@@ -327,7 +327,9 @@ Future<void> main() async {
)
);
if (xcodebuildExitCode != 65) { // 65 returned on PhaseScriptExecution failure.
if (!xcodebuildOutput.contains('flutter --verbose --local-engine-src-path=bogus assemble') || // Verbose output
!xcodebuildOutput.contains('Unable to detect a Flutter engine build directory in bogus') ||
!xcodebuildOutput.contains('Command PhaseScriptExecution failed with a nonzero exit code')) {
return TaskResult.failure('Host Objective-C app build succeeded though flutter script failed');
}
......
......@@ -117,7 +117,7 @@ def install_flutter_application_pod(flutter_application_path)
flutter_export_environment_path = File.join('${SRCROOT}', relative, 'flutter_export_environment.sh');
script_phase :name => 'Run Flutter Build {{projectName}} Script',
:script => "set -e\nset -u\nsource \"#{flutter_export_environment_path}\"\n\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build",
:script => "set -e\nset -u\nsource \"#{flutter_export_environment_path}\"\nexport VERBOSE_SCRIPT_LOGGING=1 && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build",
:execution_position => :before_compile
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment