如何对 iOS .xarchive 进行代码签名,以便客户端可以正确辞职?(使用推送通知) [英] How can I code sign an iOS .xarchive so a client can resign properly? (using push notifications)

查看:23
本文介绍了如何对 iOS .xarchive 进行代码签名,以便客户端可以正确辞职?(使用推送通知)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用开发者配置文件创建一个 iOS .xarchive 文件,客户可以使用他们的分发配置文件辞职.

I need to create an iOS .xarchive file using a developer profile, that a client can resign using their distribution profile(s).

(我读过这个,但它没有任何真正的解决方案:如何将 iOS 应用发送给客户端,让他们进行代码签名)

(I have read this but it didn't have any real solutions: How can I send iOS app to client, for them to code-sign)

客户不想共享他们的私钥,也不想在会员中心的开发人员"上方授予我访问权限.我们不想分享我们的源代码.

The client doesn't want to share their private keys, nor give me access above 'Developer' in the member center. And we don't want to share our source code.

我们需要支持推送通知,所以这意味着我们需要一个完全合格的应用 ID.

We need to support push notifications, so this means we need a fully qualified app id.

我想不出一种方法,允许我构建和导出使用aps production"签名的 .xarchive,get-task-allow"为 false,但也使用与客户端分发证书匹配的证书.

I cannot figure out a way that allows me to build and export an .xarchive signed with 'aps production', 'get-task-allow' as false, BUT ALSO using the certificate that matches the clients distribution certificate.

这感觉像是 Xcode 中的一个错误,对aps production"和get-task-allow"的更改不应该与配置相关联,而不是与配置文件的类型相关吗?我正在使用发布",但使用的是我的开发者资料.

This feels like a bug in Xcode, shouldn't the changes to 'aps production' and 'get-task-allow' be tied to the configuration, not the type of provisioning profile? I am using 'Release', but with my developer profile.

我是否遗漏了什么,或者这是不可能的?

Am I missing something, or is this just not possible?

推荐答案

我通过反复试验找到了这个问题的答案.尽管技术说明和大多数网络资源都说如果您使用 XCode4+,则不需要 entitlements.plist,但在某些情况下您需要这样做.我上面的问题代表了两种情况:

I figured out the answer to this question through trial and error. Even though tech notes and most web resources say you don't need an entitlements.plist if you are using XCode4+, there are certain cases where you do. Two cases are represented by my question above:

  • 构建发布配置(即:存档),但使用开发者配置文件进行签名
  • 使用推送通知

我的最终自定义 entitlements.plist 有 3 个值:

My final custom entitlements.plist has 3 values:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>get-task-allow</key>
    <false/>
    <key>aps-environment</key>
    <string>production</string>
    <key>keychain-access-groups</key>
    <array>
        <string>L23874DF.com.your.appid</string>
    </array>
</dict>
</plist>

在我的 entitlements.plist 中设置后,我使用该应用程序 ID 的开发人员配置文件进行构建.然后我将其存档,并从组织者中导出存档.导出后,我将其发送给我的客户.客户端能够使用临时配置文件退出存档,并将 IPA 文件发回给我,我将其加载到我的设备上.我也成功收到了 Urban Airship 给这个 IPA 的推送通知!

Once I had that in my entitlements.plist, I built with the developer provisioning profile for this app id. Then I archived it, and exported the archive from the organizer. Once exported, I sent it to my client. The client was able to resign the archive with an ad hoc profile, and send me back an IPA file, which I loaded onto my device. I also successfully received a push notification from Urban Airship to this IPA!

这篇关于如何对 iOS .xarchive 进行代码签名,以便客户端可以正确辞职?(使用推送通知)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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