我正在运行带有Xcode 9版本的iOS的Azure构建管道。我有cocoapods步骤,可以安装pod。然后在构建步骤中,出现以下错误。我启用了干净的构建选项。我也尝试在运行cocoapods步骤之前使用rm -rf Pods
运行bash脚本,但是我仍然遇到相同的文件退出错误,但有时却使用了不同的文件。知道如何解决这个问题吗?
...
▸ Linking GoogleToolboxForMac
▸ Generating 'GoogleToolboxForMac.framework.dSYM'
▸ Building Pods/GrowingTextView [Release]
▸ Check Dependencies
▸ Processing GrowingTextView-Info.plist
▸ Copying GrowingTextView-umbrella.h
/usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/fileutils.rb:239:in `mkdir': File exists @ dir_s_mkdir - build (Errno::EEXIST)
from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/fileutils.rb:239:in `fu_mkdir'
from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/fileutils.rb:217:in `block (2 levels) in mkdir_p'
from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/fileutils.rb:215:in `reverse_each'
from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/fileutils.rb:215:in `block in mkdir_p'
from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/fileutils.rb:200:in `each'
from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/fileutils.rb:200:in `mkdir_p'
from /usr/local/lib/ruby/gems/2.6.0/gems/xcpretty-0.3.0/lib/xcpretty/reporters/reporter.rb:29:in `finish'
from /usr/local/lib/ruby/gems/2.6.0/gems/xcpretty-0.3.0/lib/xcpretty/reporters/junit.rb:65:in `finish'
from /usr/local/lib/ruby/gems/2.6.0/gems/xcpretty-0.3.0/bin/xcpretty:89:in `each'
from /usr/local/lib/ruby/gems/2.6.0/gems/xcpretty-0.3.0/bin/xcpretty:89:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.6.0/bin/xcpretty:23:in `load'
from /usr/local/lib/ruby/gems/2.6.0/bin/xcpretty:23:in `<main>'
##[error]Error: /usr/bin/xcodebuild failed with return code: 65
##[section]Finishing: Xcode build
答案 0 :(得分:1)
大多数时候,在Azure Pipelines上,cocoapods出现错误65与签名和证书有关,而XCode尝试对不支持签名的Pod项目进行签名。
您启用或禁用了useXcpretty: 'false'
吗?我建议禁用它,因为它可能会在管道日志中隐藏真正的XCode错误。
我必须在Podfile
的末尾添加以下内容,以强制禁用Pod中的签名:
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = ''
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
config.build_settings['CODE_SIGNING_REQUIRED'] = 'NO'
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = ''
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
config.build_settings['CODE_SIGNING_REQUIRED'] = 'NO'
end
end
end