From 9a66018f0dc9987ba2f87345387f8fa274b078cf Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Tue, 24 Sep 2019 12:20:00 -0700 Subject: [PATCH] Make module pod headers public (#40927) --- .../host_app_ephemeral_cocoapods/Podfile.copy.tmpl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 bc2905d729..8965230aa7 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 @@ -3,10 +3,24 @@ platform :ios, '8.0' flutter_application_path = '../' load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb') +use_frameworks! + target 'Runner' do install_flutter_engine_pod install_flutter_plugin_pods flutter_application_path end +post_install do |installer| + installer.pods_project.targets.each do |target| + # Aggregate targets do not have a headers build phase. + if target.respond_to?('headers_build_phase') + target.headers_build_phase.files.each do |file| + # Make headers public so they can be imported by the host application. + file.settings = { 'ATTRIBUTES' => ['Public'] } + end + end + end +end + # Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. install! 'cocoapods', :disable_input_output_paths => true