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

This commit is contained in:
Jenn Magder 2021-01-11 10:29:26 -08:00 committed by GitHub
parent 062022b950
commit 4d5db88998
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -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');
}

View File

@ -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