用于 Ad Hoc 分发的 XCode 4 的 iPhone 权利问题

发布于 2024-10-26 09:46:37 字数 921 浏览 3 评论 0原文

我已经重新阅读了 Ad Hoc 发行版上的所有文档和帖子,但仍然存在问题。如果我尝试“无线”分发(使用 Safari 下载 .plist 和 .ipa 文件),应用程序开始下载,图标绘制正确,名称从“正在安装..”更改,但当完成大约 90% 时,我收到“无法下载...”警报。

如果我使用 iTunes 方法传输应用程序,我会收到“应用程序“xx”未安装在 iPhone“xx”上,因为权利不正确。”

问题 1:我了解到您不再需要单独添加 .mobileprovision 文件,因为 XCode(我使用的是 4.0.1)将其添加到捆绑包中 - 这是真的吗?

Q2:当我在 safari(在 iPhone 上)中“下载”.mobileprovision 时,它仅将其显示为文本。这是我的问题的症状还是无关紧要的?

Q3:这个问题与 Entitlements.plist 相关吗?我找不到 Apple 的任何文档或任何与我使用 XCode 4.0.1 编辑此文件时所看到的内容相关的博客。如果我按照说明进行操作(新建->新文件->代码签名->权利),我会得到一个只有“可调试”密钥的默认文件。我尝试将其设置为“否”,添加一个 get-task-allow 键(替换现有的 - 大概可以调试是相同的键?)添加我的应用程序标识符,并添加一个 iPhone 权利字典,其中包含上述两个键(根据苹果的文档)。

问题 4:尝试让权利和代码签名发挥作用的 iPhone 开发人员的自杀率是多少?

为了减少我见过的类似问题的建议: 我确实已将代码签名权利设置到我的 Entitlements.plist 中以进行分发和发布。 我尝试过重新启动 XCode、重建、存档等 我尝试过重启 iPhone 我已经回到 iPhone

更新:在 XCode 4.0.1 中,编辑 Entitlements.plist 时有一个菜单选项(编辑器 -> 显示原始键和值),该选项会将键从“可以调试”切换为'获取任务允许'

I have reread all the documentation and postings on Ad Hoc distribution and still have a problem. If I try 'wireless' distribution (with a .plist and .ipa file being downloaded using Safari) the app starts to download, the icon is drawn correctly and the name changes from 'Installing..' but when its about 90% complete I get an 'Unable to Download ...' alert.

If I use the iTunes method of transferring the app I get 'The app "xx" was not installed on the iPhone "xx" because the entitlements are not correct.'

Q1: I have read that you no longer need to separately add the .mobileprovision file because XCode (I am using 4.0.1) adds it to the bundle - is this true ?

Q2: when I 'download' the .mobileprovision in safari (on the iPhone) it merely displays it as text. Is this symptomatic of my problem or an irrelevancy ?

Q3: does this problem concern the Entitlements.plist ? I can't find any documentation from Apple or any blogs that relate to what I see when editing this file with XCode 4.0.1. If I follow the instructions (New->New File->Code Signing->Entitlements) I get a default file with only a 'Can be debugged' Key. I have tried setting this to NO, adding a get-task-allow Key (replacing the existing - presumably Can be debugged is the same key ?) adding my application-identifier, and adding an iPhone Entitlements Dictionary with the above two keys in (as per Apple's documentation).

Q4: what is the suicide rate amongst iPhone developers trying to get Entitlements and Code Signing working?

To cut down on suggestions I've seen for similar questions:
I do have Code Signing Entitlements set to my Entitlements.plist for Distribution and Release.
I have tried restarting XCode, rebuilding, archiving etc
I have tried restarting the iPhone
I have gone back to the iPhone

Update:In XCode 4.0.1 there is a menu option when the Entitlements.plist is being edited (Editor->Show Raw Keys and Values) which will toggle the key from 'Can be debugged' to 'get-task-allow'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

痴梦一场 2024-11-02 09:46:37

权利文件应该是:

<?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>application-identifier</key>
           <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
         <key>keychain-access-groups</key>
           <array>
             <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
           </array>
</dict>
</plist>

这也适用于无线。
到底为什么默认的没有这一切,只有苹果才能回答。
我看不到如何在 Xcode 中编辑 plist 的原始文本,因此在 TextEdit 中编辑。

The entitlements file should be:

<?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>application-identifier</key>
           <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
         <key>keychain-access-groups</key>
           <array>
             <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
           </array>
</dict>
</plist>

this works for wireless too.
Why on earth the default one doesn't have all this in is something only Apple can answer.
I can't see how to edit the raw text of a plist in Xcode so edited in TextEdit.

忆悲凉 2024-11-02 09:46:37

Xcode 4 中的 Ad Hoc 构建不再需要代码签名权利 - 请参阅 Apple 技术说明 TN2250

Code signing entitlements are no longer necessary for Ad Hoc builds in Xcode 4 - see details notes in Apple Technical Note TN2250

森林很绿却致人迷途 2024-11-02 09:46:37

我刚刚写了一篇博客文章,概述了在 Xcode 4 中成功进行临时分发的所有步骤,这可能会有所帮助。 http://www.musicalgeometry.com/?p=1237

I just wrote a blog post outlining all the steps to successful ad hoc distributions in Xcode 4 which may be helpful. http://www.musicalgeometry.com/?p=1237

离不开的别离 2024-11-02 09:46:37

Entitlements.plist 应该添加到项目中,并且里面应该只有 get-task-allow 键。

当使用开发人员配置文件在设备上调试时,应选中它

当使用 Ad-HocDistribution 配置文件构建时,应取消选中它

关于 Q4:如果您愿意,可以增加它只是做...但我不推荐这样做。

Entitlements.plist should be added in project and there should be only get-task-allow key inside it.

When debugging on device using developer profile, It should be checked

When building using Ad-Hoc or Distribution profile, It should be unchecked

Regarding Q4: If you like you can increase it by just doing... but I don't recommend it.

雾里花 2024-11-02 09:46:37

如果您在项目导航器中右键单击 plist 文件,然后选择“打开为”,然后选择“源代码”,则可以将其作为纯源进行编辑。

If you right click on the plist file in the project navigator, and select "Open As" then "Source Code", you can edit it as plain source.

十雾 2024-11-02 09:46:37

也许他们在 xcode4 中制作了 Entitlements.plist 的较短版本。默认的 Entitlements.plist 不包含“application-identifier”和“keychain-access-groups”键,但是如果您通过“ASCII 属性编辑器”更改“Can be debugged”键的值,它确实会更改后台“get-task-allow”键的值...

Maybe they made a shorter version of Entitlements.plist in xcode4. The default Entitlements.plist does not contain the 'application-identifier' and the 'keychain-access-groups' keys, but if you change the value of the 'Can be debugged' key via the 'ASCII Property editor' it really changes the value of the 'get-task-allow' key in the background...

秋叶绚丽 2024-11-02 09:46:37

我尝试将权利参数设置为“打开”或“关闭”,重新下载我记事以来一直使用的临时临时文件,并尝试了数百种其他组合。没有一个对我有用,直到...我去了临时门户并重新创建了一个新的临时门户。

真正让我熬夜到凌晨 4:00 并浪费了我本没有的时间的是我如何创建临时临时文件。在苹果的iOS临时Portal页面上,如果点击左侧栏的“配置”,您将看到4个选项卡:“开发”、“分发”和另外两个。我曾经使用在“开发”选项卡下创建的临时文件并添加了所有测试用户的手机 UUID。多年来,这种方法一直对我有用,直到 xCode 4 出现,而​​我却愚蠢地太快地加入了。每当 xCode 有更新时,Apple 工程师总是给我一个惊喜的“午夜”派对。他们会等待足够长的时间让我忘记这次经历并发布下一次。

对我有用的解决方案是在分发选项卡下创建临时文件。当您在此处创建新的临时文件时,您可以选择“临时”作为“分发方法”。在 xCode 项目和目标构建设置上使用此临时版本并关闭权利上的“可以调试”后,我可以通过 iTunes 或通过 OTA 安装。我希望这个技巧可以帮助人们挽救一些白发。

I tried setting the entitlements parameter "on" or "off", re-download my ad-hoc provisional that had been used for as long as I can remember, and tried hundreds of other combinations. None worked for me until...I went to the provisional portal and recreate a new provisional.

What really got me to stay up until 4:00AM and wasting hours of time that I did not have was how I created the ad hoc provisional. On Apple's iOS provisional Portal page, if you click on the "provisioning" on the left side bar, you will see 4 tabs: "development", "distribution", and the other two. I used to use my provisional created under the "development" tab and added all the test users' phone UUID. That had worked for me for years until the xCode 4 came along, and I was stupid enough to jump on board too fast. Apple engineers had always given me a surprise "mid-night" party every time xCode had an update. And they will wait long enough for me to forget this experience and release the next one.

The solution that worked for me was to create a provisional under the distribution tab. When you create a new provisional here, you have the option of selecting "ad hoc" as the "Distribution Method." After used this provisional on xCode project and target build setting, and turned off "can be debugged" on the entitlements, I then could install via iTunes or via OTA. I hope this tip might help someone save a few gray hair.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文