所以,如果label是pod中的一个库,那么您可能会受到cocoapods bug的影响。请尝试在您的podfile中添加这个post_install。
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings.delete('CODE_SIGNING_ALLOWED')
config.build_settings.delete('CODE_SIGNING_REQUIRED')
end
end
我建议您从Xcode中删除所有派生数据并进行清理。
然后,使用 pod install
重新安装pods。
我需要将上述两个优秀答案(Podfile修改和cocoa pod版本1.4.0)加上另一个来自其他主题的 Podfile 修改结合起来。
我的 Podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.new_shell_script_build_phase.shell_script = "mkdir -p $PODS_CONFIGURATION_BUILD_DIR/#{target.name}"
target.build_configurations.each do |config|
config.build_settings['CONFIGURATION_BUILD_DIR'] = '$PODS_CONFIGURATION_BUILD_DIR'
config.build_settings.delete('CODE_SIGNING_ALLOWED')
config.build_settings.delete('CODE_SIGNING_REQUIRED')
end
end
end
那么
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.4.0
在Xcode 9.4.1上对我有效。