准备一个未签名的Xcarchive [英] Preparing an unsigned Xcarchive

查看:102
本文介绍了准备一个未签名的Xcarchive的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<强> TLDR;问题:有没有办法准备一个XArchive,然后他们可以自己分配配置文件并使用适当的分发证书签名?

TLDR; Question: Is there a way to prepare a an XArchive that they can then assign a provisioning profile themselves and sign using an appropriate distribution certificate?

长问题:
我的客户端向我发送了我正在为他们开发的应用程序的配置文件。他们不想向我发送他们的分发证书(.p12文件)。

Long Question: My client sent me a provisioning profile for an app I'm developing for them. They don't want to send me their Distribution Certificate (.p12 file).

他们给我的指示如下:


  1. 将配置文件加载到您的系统上

  2. 在您的项目中,选择目标的
    构建设置下的配置文件在供应配置文件部分中

  3. 不要选择代码签名标识

  4. 运行,产品 - >存档

  5. 选择导出为XCode存档时,选择分发

  1. Load the provisioning profile onto your system
  2. In your project, choose the provisioning profile under the target's "Build Settings" within the "Provisioning Profile" section
  3. Do not choose a Code Signing Identity
  4. Run, Product->Archive
  5. Choose "Export as XCode Archive" when given the option to Distribute

问题是,执行步骤4时,我得到以下错误:

The problem is, when executing step 4, I get the following error:

CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'

他们的想法是他们会将应用程序编码在他们身边(从而保护他们的证书)。有没有办法做到这一点?

Their thought was they would codesign the app on their side (thus protecting their certificate). Is there a way to do that?

推荐答案

能够使用以下技术做到这一点:

Was able to do this using the following technique:


  1. 通过developer.apple.com创建内部分发配置文件

  2. 选择任何AppID是将与此个人资料(或通配符)相关联。

  3. 选择要包含在个人资料中的分发证书

  4. 通过下载并双击它们来安装计算机上的证书和配置文件(或者如果使用XCode 5,则可以通过刷新来通过帐户偏好设置面板执行此操作)

  5. 最重要的:在项目中创建Entitlements.plist文件,将其分配给支持文件组以获得良好的衡量标准。在此文件中添加一个密钥,然后从关键字下拉列表中选择get-task-allow或Can be debugged(这取决于plist编辑器是否显示原始密钥值)。该值应为NO

  6. 在项目的构建设置中的代码签名部分下,执行以下操作:
  1. Create an In House Distribution provisioning file through developer.apple.com
  2. Choose whatever AppID is going to be associated with this profile (or the wildcard one)
  3. Select a Distribution certificate to include in the profile
  4. Install both the certificate and provisioning profile on your computer by downloading them and double clicking on them (or if using XCode 5 you can do that through the Accounts preferences pane by refreshing)
  5. Most important: Create an "Entitlements.plist" file in your project, have it assigned to your "Supporting Files" group for good measure. Add a key to this file and from the dropdown list of keynames pick "get-task-allow" or "Can be debugged" (it depends on whether or not your plist editor is showing raw key values). The value should be "NO"
  6. Under the Code Signing section in your project's build settings do the following:

  1. 代码签名权利设置中,键入.xcodeproj文件所在的相对路径到Entitlements.plist所在的位置。例如,如果.xcodeproj文件驻留在具有名为MyApp的子文件夹且EntApp文件夹中存在Entitlements.plist文件的文件夹中,则将值设置为:MyApp / Entitlements.plist

  2. 代码签名部分下选择配置文件和证书

  1. In the Code Signing Entitlements setting type the relative path from where your .xcodeproj file resides to where the Entitlements.plist exists. For instance, if your .xcodeproj file resides in a folder that has a subfolder named "MyApp" and your Entitlements.plist file exists in the "MyApp" folder, you'd set the value to: MyApp/Entitlements.plist
  2. Select the provisioning profile under and certificate under the Code Signing section


Voila,通过Product-> Archive构建您的Xcarchive并将其交给您的客户,他们将能够使用自己的个人资料和证书重新签名。

Voila, build your Xcarchive via the Product->Archive and give it to your client, they'll be able to re-sign it with their own profile and certificate.

这篇关于准备一个未签名的Xcarchive的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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