Xcode升级到14后,编译报错:
Signing for "xxx" requires a development team. select a development team in the signing & capabilities editor
该错误为Pod库中包含Test的Target,需要设置Team ID
项目中错误样式
Pods库中错误样式
修复方式
第一种:手动修改的报错Pods的库
第二种:Podfile 中添加团队ID
post_install do |installer|
# Get main project development team id
dev_team = ""
project = installer.aggregate_targets[0].user_project
project.targets.each do |target|
target.build_configurations.each do |config|
if dev_team.empty? and !config.build_settings['DEVELOPMENT_TEAM'].nil?
dev_team = config.build_settings['DEVELOPMENT_TEAM']
end
end
end
# Fix bundle targets' 'Signing Certificate' to 'Sign to Run Locally'
installer.pods_project.targets.each do |target|
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
target.build_configurations.each do |config|
config.build_settings['DEVELOPMENT_TEAM'] = dev_team
end
end
end
end
第三种:针对Bundle类型的做强制不签名。 可能会上线错误:ITMS-90284,必须使用配置文件中包含的证书进行签名。
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end
end