使用 xcodebuild 命令行自动签名打包

3 篇文章 0 订阅

系统:macOS Mojave 10.14.1

xcode:Version 10.0 (10A255)

打包命令:xcodebuild

命令格式使用 xcodebuild -help 查询

1.clean

xcodebuild clean -project xxx.xcodeproj -configuration Release -alltargets

2.archive

xcodebuild archive -project xxx.xcodeproj -sdk iphoneos -scheme scheme_name -configuration Release -archivePath archive_path 

3.export

xcodebuild -exportArchive -archivePath archive_path -exportPath export_path -exportOptionsPlist exportOptionsPlist

红色部分为必须替换的内容,根据各自工程设置填写,绿色可选修改,签名和profile信息主要在 exportOptionsPlist 指定的plist文件里,这个 plist 文件不会添的话可以从 xcode 导出目录拷贝,使用 xcode archive 之后,导出 distribute app,导出的时候只要正确选则号签名和 profile 就可以导出了,导出目录里有个 ExportOptions.plist 文件,这个就是 exportOptionsPlist。一般导出发布app store的版本和可以安装到指定设备上的 development 版本,这个指定设备需要在ios开发后台创建许可证的地方添加。

exportOptionsPlist 主要指定参数,参数内容均可在 xcodebuild -help 中查询到范本:


    <key>provisioningProfiles</key>
    <dict>
        <key>包名 bundle ID</key>
        <string>Profile的uuid</string>
    </dict>
    <key>signingCertificate</key>
    <string>证书</string>
    <key>teamID</key>
    <string>开发者ID</string>
    <key>method</key>
    <string>导出方式(app-store 或 development)</string>

参考:

iOS自动签名打包(xcodebuild):https://www.jianshu.com/p/722adedaa3bf

上面这个的git地址:https://github.com/qindeli/NoWorkspaceShell/blob/master/xcodebuild.sh

xcode APP 打包以及提交apple审核详细流程(新版本更新提交审核):https://blog.csdn.net/mad1989/article/details/8167529

Xcode9 xcodebuild export plist 配置:https://blog.csdn.net/andanlan/article/details/78113330?locationNum=9&fps=1

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

GrimRaider

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值