Use BUILD_LIBRARY_FOR_DISTRIBUTION build setting for generating add-to-app frameworks (#50536)

This commit is contained in:
Jenn Magder
2020-02-11 15:53:02 -08:00
committed by GitHub
parent 0a38f29c0d
commit bfbb347682
3 changed files with 29 additions and 16 deletions

View File

@@ -475,7 +475,8 @@ end
'-destination generic/platform=iOS',
'SYMROOT=${iPhoneBuildOutput.path}',
'BITCODE_GENERATION_MODE=$bitcodeGenerationMode',
'ONLY_ACTIVE_ARCH=NO' // No device targeted, so build all valid architectures.
'ONLY_ACTIVE_ARCH=NO', // No device targeted, so build all valid architectures.
'BUILD_LIBRARY_FOR_DISTRIBUTION=YES',
];
RunResult buildPluginsResult = await processUtils.run(
@@ -500,8 +501,8 @@ end
'-destination generic/platform=iOS',
'SYMROOT=${simulatorBuildOutput.path}',
'ARCHS=x86_64',
'ONLY_ACTIVE_ARCH=NO'
// No device targeted, so build all valid architectures.
'ONLY_ACTIVE_ARCH=NO', // No device targeted, so build all valid architectures.
'BUILD_LIBRARY_FOR_DISTRIBUTION=YES',
];
buildPluginsResult = await processUtils.run(

View File

@@ -10,17 +10,5 @@ target 'Runner' do
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