xcodebuild打包总结

[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.csdn.net/sqq521/article/details/46830201[/size][/size][/size][/size]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值