packages/flutter_tools/bin/podhelper.rb
# Add iOS build settings to pod targets.
#
# @example
# post_install do |installer|
#   installer.pods_project.targets.each do |target|
#     flutter_additional_ios_build_settings(target)
#   end
# end
# @param [PBXAggregateTarget] target Pod target.
Add iOS build settings to pod targets.
Add iOS build settings to pod targets .
def flutter_additional_ios_build_settings(target)
  return unless target.platform_name == :ios
  inherit_deployment_target = target.deployment_target[/\d+/].to_i < 9
  target.build_configurations.each do |build_configuration|
    build_configuration.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] = 'NO'
    build_configuration.build_settings['ENABLE_BITCODE'] = 'NO'
    build_configuration.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' if inherit_deployment_target
  end
end
def flutter_additional_ios_build_settings ( target ) return unless target . platform_name == :ios inherit_deployment_target = target . deployment_target [ / \d + / ] . to_i < 9 target . build_configurations . each do | build_configuration | build_configuration . build_settings [ 'CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER' ] = 'NO' build_configuration . build_settings [ 'ENABLE_BITCODE' ] = 'NO' build_configuration . build_settings . delete 'IPHONEOS_DEPLOYMENT_TARGET' if inherit_deployment_target end end
Add iOS build settings to pod targets.
Add iOS build settings to pod targets .
# [target.deployment_target] is a [String] formatted as "8.0". # Suppress warning when pod supports a version lower than the minimum supported by Xcode (Xcode 12 - iOS 9). # This warning is harmless but confusing--it's not a bad thing for dependencies to support a lower version. # When deleted, the deployment version will inherit from the higher version derived from the 'Runner' target. # If the pod only supports a higher version, do not delete to correctly produce an error.
target
target Pod target.
target Pod target .
example
post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) end end
post_install do |installer| installer . pods_project . targets . each do |target| flutter_additional_ios_build_settings ( target ) end end