如何在命令行中调用Builtin-productPackagingUtility [英] how to call builtin-productPackagingUtility in command line

查看:150
本文介绍了如何在命令行中调用Builtin-productPackagingUtility的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在构建设置(Xcode 4.2.1)中指定权利和代码签名身份时,从Xcode进行构建时,将显示以下输出:

When you specify an entitlement and a code signing identity in build settings (Xcode 4.2.1), you have the following output when you build from Xcode:

ProcessProductPackaging "myAppName.entitlements" "/path/to/myAppName.xcent"
cd /path/to/myAppName/SourceCode
builtin-productPackagingUtility "/path/to/myAppName/SourceCode/myAppName.entitlements" -entitlements -format xml -o "/path/to/myAppName.xcent"


CodeSign "/path/to/Garfields Comic Boom 1.0.app"
cd /path/to/myAppName/SourceCode
setenv CODESIGN_ALLOCATE /Developer/usr/bin/codesign_allocate
/usr/bin/codesign --force --sign "myCertificate" --entitlements "/path/to/myAppName.xcent" "/path/to/myAppName.app"

我想在构建结束时而不是在Xcode构建期间对我的应用程序文件夹签名.

I would like to sign my app folder at the end of the build, and not during the Xcode build.

我的问题是我不知道如何在命令行中生成xcent文件.

My problem is I don't know how to generate the xcent file in the command line.

问题:如何在命令行中生成xcent文件?我从根本上做了一个发现,没有什么叫做productPackagingUtility ...

推荐答案

我想在构建结束时对我的应用程序文件夹签名,而不是在Xcode构建过程中签名.

I would like to sign my app folder at the end of the build, not during the Xcode build.

如果您为设备版本禁用代码签名,则IIRC最新版本的Xcode会抱怨.

IIRC recent versions of Xcode complain if you disable code signing for a device build.

解决此问题的最简单方法是让Xcode对它进行签名,然后在以后对其进行重新签名.步骤大概是

The easiest way around this is to let Xcode sign it and then re-sign it later. Steps are approximately

  1. 使用codesign -d --entitlements=MyApp.xcent MyApp.app
  2. 转储原始权利
  3. 如果要更改配置文件,请将新文件复制到MyApp.app/embedded.mobileprovision并相应地修改权利(IIRC文件格式为4字节魔术,长度为4字节;请记住更新长度!).
  4. 使用所需的证书重新签名.
  1. Dump the original entitlements with codesign -d --entitlements=MyApp.xcent MyApp.app
  2. If you're changing provisioning profiles, copy the new one to MyApp.app/embedded.mobileprovision and modify the entitlements accordingly (IIRC the file format has a 4-byte magic and a 4-byte length; remember to update the length!).
  3. Re-sign with your desired certificate.

这篇关于如何在命令行中调用Builtin-productPackagingUtility的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆