当前位置:   article > 正文

使用 xcodebuild 命令行自动签名打包_xcodebuild命令归档并签名

xcodebuild命令归档并签名

系统: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

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/314484
推荐阅读
  

闽ICP备14008679号