[size=medium][size=large][size=medium][size=small]xcodebuild
--help
-version
-showsdks
-list 工程目录下
// clean工程
xcodebuild clean
//
-configuration Debug/Release
-workspace SoYoungMobile40.xcworkspace
-project SoYoungMobile40.xcodeproj
-scheme SoYoungMobile40
//
-sdk iphoneos10.0
总结:
自动签名只能在Xcode中使用,使用CI打包工具需要使用手动来配置。
# 编译、生成xcarchive文件 (这条命令适用于automatic签名)
xcodebuild clean archive -archivePath build/SoYoungMobile40.xcarchive -workspace SoYoungMobile40.xcworkspace -scheme SoYoungMobile40 -configuration Release DEVELOPMENT_TEAM_Production=UTKJ82F75E
# 把编译、生成xcarchive文件生成ipa包
xcodebuild -exportArchive -exportFormat IPA -archivePath build/SoYoungMobile40.xcarchive -exportPath build/SoYoungMobile40.ipa
========
# 安装select_xcode_signing_method脚本 用来切换automatic和manual签名方式
# https://gist.github.com/thelvis4/253a2cdea8360da519b2a025c5d8fbac
gem install xcodeproj # 需要先安装工具
ruby select_xcode_signing_method.rb -p . -t SoYoungMobile40 -m 'Manual'
# 可用 Debug
xcodebuild clean archive -archivePath build/SoYoungMobile40.xcarchive -workspace SoYoungMobile40.xcworkspace -scheme SoYoungMobile40 -configuration Debug PROVISIONING_PROFILE_SPECIFIER='soyoungapp' CODE_SIGN_IDENTITY='iPhone Developer'
# 可用 Distribution
xcodebuild clean archive -archivePath build/SoYoungMobile40.xcarchive -workspace SoYoungMobile40.xcworkspace -scheme SoYoungMobile40 -configuration Release PROVISIONING_PROFILE_SPECIFIER='qd_dis' CODE_SIGN_IDENTITY='iPhone Distribution'
#可用 adhoc
xcodebuild clean archive -archivePath build/SoYoungMobile40.xcarchive -workspace SoYoungMobile40.xcworkspace -scheme SoYoungMobile40 -configuration Release PROVISIONING_PROFILE_SPECIFIER='qd_adhoc1' CODE_SIGN_IDENTITY='iPhone Distribution'
# 生成ipa包
xcodebuild -exportArchive -exportFormat IPA -archivePath build/SoYoungMobile40.xcarchive -exportPath build/SoYoungMobile40.ipa
参考:
http://stackoverflow.com/questions/39500634/use-xcodebuild-xcode-8-and-automatic-signing-in-ci-travis-jenkins-environmen
https://pewpewthespells.com/blog/migrating_code_signing.html#signing-methods-xcode-8
http://blog.youkuaiyun.com/sqq521/article/details/46830201[/size][/size][/size][/size]
--help
-version
-showsdks
-list 工程目录下
// clean工程
xcodebuild clean
//
-configuration Debug/Release
-workspace SoYoungMobile40.xcworkspace
-project SoYoungMobile40.xcodeproj
-scheme SoYoungMobile40
//
-sdk iphoneos10.0
总结:
自动签名只能在Xcode中使用,使用CI打包工具需要使用手动来配置。
# 编译、生成xcarchive文件 (这条命令适用于automatic签名)
xcodebuild clean archive -archivePath build/SoYoungMobile40.xcarchive -workspace SoYoungMobile40.xcworkspace -scheme SoYoungMobile40 -configuration Release DEVELOPMENT_TEAM_Production=UTKJ82F75E
# 把编译、生成xcarchive文件生成ipa包
xcodebuild -exportArchive -exportFormat IPA -archivePath build/SoYoungMobile40.xcarchive -exportPath build/SoYoungMobile40.ipa
========
# 安装select_xcode_signing_method脚本 用来切换automatic和manual签名方式
# https://gist.github.com/thelvis4/253a2cdea8360da519b2a025c5d8fbac
gem install xcodeproj # 需要先安装工具
ruby select_xcode_signing_method.rb -p . -t SoYoungMobile40 -m 'Manual'
# 可用 Debug
xcodebuild clean archive -archivePath build/SoYoungMobile40.xcarchive -workspace SoYoungMobile40.xcworkspace -scheme SoYoungMobile40 -configuration Debug PROVISIONING_PROFILE_SPECIFIER='soyoungapp' CODE_SIGN_IDENTITY='iPhone Developer'
# 可用 Distribution
xcodebuild clean archive -archivePath build/SoYoungMobile40.xcarchive -workspace SoYoungMobile40.xcworkspace -scheme SoYoungMobile40 -configuration Release PROVISIONING_PROFILE_SPECIFIER='qd_dis' CODE_SIGN_IDENTITY='iPhone Distribution'
#可用 adhoc
xcodebuild clean archive -archivePath build/SoYoungMobile40.xcarchive -workspace SoYoungMobile40.xcworkspace -scheme SoYoungMobile40 -configuration Release PROVISIONING_PROFILE_SPECIFIER='qd_adhoc1' CODE_SIGN_IDENTITY='iPhone Distribution'
# 生成ipa包
xcodebuild -exportArchive -exportFormat IPA -archivePath build/SoYoungMobile40.xcarchive -exportPath build/SoYoungMobile40.ipa
参考:
http://stackoverflow.com/questions/39500634/use-xcodebuild-xcode-8-and-automatic-signing-in-ci-travis-jenkins-environmen
https://pewpewthespells.com/blog/migrating_code_signing.html#signing-methods-xcode-8
http://blog.youkuaiyun.com/sqq521/article/details/46830201[/size][/size][/size][/size]