iOS 相关
- 问题
xcodebuild
无效
xcode-select: error: tool 'xcodebuild' requires Xcode,
but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
答
# Install Command Line Tools if you haven't already.
xcode-select --install
sudo xcode-select --switch
# Enable command line tools
/Library/Developer/CommandLineTools
# 确认你的 xcode , 如果有两个 xcode
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
- 问题2 签名失败
jenkins 自动打包时, 签名失败
error: exportArchive: No profiles for '' were found
签名账户登录问题
error: exportArchive: The operation couldn’t be completed. Unable to log in with account ''.
原因是:
1️⃣ Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild
开启自动签名
2️⃣ Xcode 9.3
默认不允许访问钥匙串,导致无法签名
3️⃣ Xcode 9.3
的账户管理有问题. 即便是登录了账户, 且 xcodebuild -exportArchive
后面添加了 -allowProvisioningUpdates
, 仍然有问题, 因为 退出 Xcode 时, 账户信息仍然会丢失. 导致提示 .
解决办法
1️⃣ xcodebuild -exportArchive
后面添加了 -allowProvisioningUpdates
2️⃣ 使用Xcode 9.2 版本
网友评论