From 78cca6250a7104cc1dd89edf1982878530e55ee6 Mon Sep 17 00:00:00 2001 From: jmagman Date: Fri, 9 Aug 2019 17:37:11 -0700 Subject: [PATCH] Always install the ephemeral engine copy instead of fetching from CocoaPods specs (#37906) --- dev/devicelab/bin/tasks/module_test_ios.dart | 9 +++++++++ .../ios/host_app_ephemeral_cocoapods/Podfile.copy.tmpl | 1 + 2 files changed, 10 insertions(+) diff --git a/dev/devicelab/bin/tasks/module_test_ios.dart b/dev/devicelab/bin/tasks/module_test_ios.dart index f82ff36559..905e7365fc 100644 --- a/dev/devicelab/bin/tasks/module_test_ios.dart +++ b/dev/devicelab/bin/tasks/module_test_ios.dart @@ -187,6 +187,15 @@ Future main() async { return TaskResult.failure('Failed to build ephemeral host .app with CocoaPods'); } + final File podfileLockFile = File(path.join(projectDir.path, '.ios', 'Podfile.lock')); + final String podfileLockOutput = podfileLockFile.readAsStringSync(); + if (!podfileLockOutput.contains(':path: Flutter/engine') + || !podfileLockOutput.contains(':path: Flutter/FlutterPluginRegistrant') + || !podfileLockOutput.contains(':path: Flutter/.symlinks/device_info/ios') + || !podfileLockOutput.contains(':path: Flutter/.symlinks/package_info/ios')) { + return TaskResult.failure('Building ephemeral host app Podfile.lock does not contain expected pods'); + } + section('Clean build'); await inDirectory(projectDir, () async { diff --git a/packages/flutter_tools/templates/module/ios/host_app_ephemeral_cocoapods/Podfile.copy.tmpl b/packages/flutter_tools/templates/module/ios/host_app_ephemeral_cocoapods/Podfile.copy.tmpl index 1e701504b3..9db5e10c18 100644 --- a/packages/flutter_tools/templates/module/ios/host_app_ephemeral_cocoapods/Podfile.copy.tmpl +++ b/packages/flutter_tools/templates/module/ios/host_app_ephemeral_cocoapods/Podfile.copy.tmpl @@ -4,6 +4,7 @@ flutter_application_path = '../' load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb') target 'Runner' do + install_flutter_engine_pod install_flutter_plugin_pods flutter_application_path end