在内网的Jenkins CI 上用脚本打包iOS,不能联外网,所以在打包命令中用Manual
的方式指定CODE SIGN
和PROVISIONING PROFILE
xcodebuild archive \
-project ${projectName}.xcodeproj \
-scheme ${projectName} \
-configuration ${configuration} \
-archivePath ../${projectName}.xcarchive \
-sdk iphoneos \
DEVELOPMENT_TEAM=${developmentTeam} \
CODE_SIGN_IDENTITY="iPhone Distribution: xxx" \
PROVISIONING_PROFILE_SPECIFIER="xxx"
有个依赖的子工程QBImagePicker
以framework
方式引入,默认是自动签名的,而且属于node_modules
下的package
,无法更改工程设置。
CI 报错QBImagePicker
与主工程签名冲突
=== BUILD TARGET QBImagePicker OF PROJECT QBImagePicker WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
Code Signing Error: QBImagePicker has conflicting provisioning settings.
QBImagePicker is automatically signed, but code signing identity iPhone Distribution: xxxx. has been manually specified.
Set the code signing identity value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor.
** ARCHIVE FAILED **
子工程QBImagePicker
需要code sign
吗?应该怎么解决这问题?
自问自答吧。。
framework 不能用Manual的方式签名,只能用 Auto Sign,所以 xcodebuild 命令中需要指定
CODE_SIGN_IDENTITY="iPhone Developer"
代表Auto Sign,不能指定PROVISIONING_PROFILE_SPECIFIER