大概你正在使用cocoapods?我不得不手动设置“自动管理签名”和相应的团队,然后它终于起作用了。感谢其他评论者的指点。对我来说 - 有两个开发团队在同一个项目上工作 - 所以不确定这个解决方案是否会是最好的。需要找到在 Podfile 级别执行此操作的方法。
注意我在 cocoapods - 1.2.0
更新 - 试试这个/编辑 Podfile 并添加到底部。运行 Pod 安装
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
end
end
如果上述方法不起作用 - 仅尝试此操作(您可能需要调整到最新的 SDK,例如 iPhoneOS10.2.sdk nb PS 有人说他们必须将 PlistBuddy 作为 sudo /usr/libexec/PlistBuddy 运行)
killall Xcode
/usr/libexec/PlistBuddy -c "Set :DefaultProperties:CODE_SIGNING_REQUIRED NO" /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/SDKSettings.plist\n
/usr/libexec/PlistBuddy -c "Set :DefaultProperties:AD_HOC_CODE_SIGNING_ALLOWED YES" /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/SDKSettings.plist\n
/usr/libexec/PlistBuddy -c "Set :DefaultProperties:CODE_SIGNING_REQUIRED NO" /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/SDKSettings.plist\n
/usr/libexec/PlistBuddy -c "Set :DefaultProperties:AD_HOC_CODE_SIGNING_ALLOWED YES" /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/SDKSettings.plist\n
xcodebuild clean build