Xcode升級(jí)到14后亲配,編譯報(bào)錯(cuò):
Signing for "xxx" requires a development team. select a development team in the signing & capabilities editor
該錯(cuò)誤為Pod庫中包含Test的Target,需要設(shè)置Team ID
項(xiàng)目中錯(cuò)誤樣式
Pods庫中錯(cuò)誤樣式
修復(fù)方式
第一種:手動(dòng)修改的報(bào)錯(cuò)Pods的庫
第二種:Podfile 中添加團(tuán)隊(duì)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
第三種:針對(duì)Bundle類型的做強(qiáng)制不簽名丐谋。 可能會(huì)上線錯(cuò)誤:ITMS-90284,必須使用配置文件中包含的證書進(jìn)行簽名嘿歌。
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