Do not codesign transitive dependency iOS pod resource bundles (#111714)
This commit is contained in:
@@ -45,6 +45,8 @@ def flutter_additional_ios_build_settings(target)
|
||||
end
|
||||
|
||||
release_framework_dir = File.expand_path(File.join(artifacts_dir, 'ios-release', 'Flutter.xcframework'), __FILE__)
|
||||
# Bundles are com.apple.product-type.bundle, frameworks are com.apple.product-type.framework.
|
||||
target_is_resource_bundle = target.respond_to?(:product_type) && target.product_type == 'com.apple.product-type.bundle'
|
||||
|
||||
target.build_configurations.each do |build_configuration|
|
||||
# Build both x86_64 and arm64 simulator archs for all dependencies. If a single plugin does not support arm64 simulators,
|
||||
@@ -52,6 +54,14 @@ def flutter_additional_ios_build_settings(target)
|
||||
# Therefore all pods must have a x86_64 slice available, or linking a x86_64 app will fail.
|
||||
build_configuration.build_settings['ONLY_ACTIVE_ARCH'] = 'NO' if build_configuration.type == :debug
|
||||
|
||||
# Workaround https://github.com/CocoaPods/CocoaPods/issues/11402, do not sign resource bundles.
|
||||
if target_is_resource_bundle
|
||||
build_configuration.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
|
||||
build_configuration.build_settings['CODE_SIGNING_REQUIRED'] = 'NO'
|
||||
build_configuration.build_settings['CODE_SIGNING_IDENTITY'] = '-'
|
||||
build_configuration.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = '-'
|
||||
end
|
||||
|
||||
# Skip other updates if it's not a Flutter plugin (transitive dependency).
|
||||
next unless target.dependencies.any? { |dependency| dependency.name == 'Flutter' }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user