为什么我可以直接在我的设备上安装应用商店发行版? [英] How come I can install an app store distribution build directly on my device?

查看:36
本文介绍了为什么我可以直接在我的设备上安装应用商店发行版?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的印象是,不可能直接在测试设备上安装应用商店发行版(不通过实际的应用商店).我发现 Apple 对以下注释的多次引用(尽管我在当前版本的 iOS 应用分发指南中找不到该注释本身):

App Store 配置文件不允许在 Apple 设备上安装分发构建的应用程序.要在设备上安装分发就绪应用程序,您必须创建一个 Ad Hoc 配置文件."

现在考虑以下事项:我有一个 Ad Hoc Distribution 配置文件和一个 App Store Distribution 配置文件.临时配置文件包含已配置设备的列表,应用商店配置文件不包含.我的(无越狱)设备包含在临时配置文件中的配置设备中.我的构建是使用应用商店配置文件签名的.生成的 .ipa 文件已提交到 App Store(并获得批准 - 但尚未公开提供).当我查看 .ipa 文件的包内容时,我看到 Embedded.mobileprovision 确实是应用商店配置文件(没有配置的设备列表).当我将此配置文件拖到我的 Xcode Organizer 时,出现无法安装配置文件的错误,因为该设备未包含在配置文件中(如预期).但是,当我将 .ipa 文件拖到我的 Xcode Organizer 时,应用程序会安装在设备上(之后可以在设备上打开).在确保设备上没有安装相同应用程序的其他副本后,我尝试了此操作.当我使用不包含在 ad hoc 配置文件的预配设备中的不同设备时,同样的事情不起作用(即使 .ipa 包含没有预配设备列表的应用商店配置文件).

有没有人对此有可能的解释?似乎以某种方式使用应用商店配置文件签名的构建仍然可以安装在包含在相应(相同的应用程序标识符?相同的团队标识符?)临时配置文件中的设备上.但如果是这种情况,那么制作单独的临时构建有什么意义?

解决方案

我也注意到了这一点,并且一直想找出它为什么有效.过去确实无法安装 App Store 版本,但似乎已经改变了,我猜是在 iOS6 或 5 中.

我发现我只能在已经安装了兼容的 Ad Hoc 配置文件的情况下安装 App Store 配置文件版本.开发人员配置文件不起作用.我没有尝试通配符配置文件.所以看起来 Ad Hoc 规则发生了变化.

我找不到安装 Ad Hoc 构建的规则,但是关于启动的主题,Apple 的应用分发指南

<块引用>

如果应用程序的 bundle ID 与应用程序 ID 匹配,签名与分发证书匹配,并且设备在 the ad hoc 的设备列表中,则应用程序成功启动配置文件.

所以我猜从技术上讲,AppStore 构建满足这些 Ad Hoc 要求,因为它也使用相同的分发证书签名.the"的使用在这里具有误导性,因为它听起来像是 iOS 咨询了您的 embedded.mobileprovision,这是不真实的.它应该读作一个"临时配置文件.

注意:只有当设备上已经安装了 Ad Hoc 配置文件时,安装才有效,所以这是制作单独的 ad hoc 构建的原因之一.

注意:这都是猜想,另一种解释可能是 Xcode 处理 embedded.mobileprovision 的安装,现在在 AppStore 配置文件安装失败时继续.

这给我提出了另一个问题:为什么在安装了完全有效的替代品后,iOS DWIM for App Store 版本却拒绝启动具有过期配置文件的 Ad Hoc 版本?

I was under the impression that it was impossible to install an app store distribution build directly on a test device (without going through the actual App Store). I found multiple references to the following note by Apple (though I could not find the note itself in the current version of the iOS App Distribution Guide):

"App Store provisioning profiles do not allow for a distribution built application to be installed on an Apple device. To install your distribution ready application on a device, you must create an Ad Hoc provisioning profile."

Now consider the following: I have an Ad Hoc Distribution provisioning profile and an App Store Distribution provisioning profile. The ad hoc profile contains a list of provisioned devices, the app store profile doesn't. My (no jailbrake) device is included in the provisioned devices in the ad hoc profile. My build was signed with the app store profile. The resulting .ipa file was submitted to the App Store (and approved - but it is not publicly available yet). When I view the package contents of the .ipa file, I see that the embedded.mobileprovision is indeed the app store profile (without the provisioned devices list). When I drag this profile to my Xcode Organizer, I get an error that the profile cannot be installed because the device is not included in the profile (as expected). However, when I drag the .ipa file to my Xcode Organizer, the app installs on the device (and can be opened on the device afterwards). I tried this after making sure there were no other copies of the same app installed on the device. The same thing does not work when I use a different device that is not included in the provisioned devices of the ad hoc profile (even though the .ipa contains the app store profile without provisioned devices list).

Does anyone have a possible explanation for this? It seems that somehow a build signed with an app store profile can still be installed on a device included in the corresponding (same app identifier? same team identifier?) ad hoc profile. But if this would be the case, what is the point of making separate ad hoc builds?

解决方案

I noticed this too and always meant to find out why it worked. It used to be true that you couldn’t install an App Store build but that appears to have changed, I’m guessing either in iOS6 or 5.

I found that I could only install App Store provisioning profile builds when a compatible Ad Hoc profile was already installed. Developer profiles did not work. I did not try wildcard profiles. So it looks like the Ad Hoc rules changed.

I can’t find the rules for installing an Ad Hoc build, but on the topic of launching the "Ad Hoc Provisioning Profiles in Depth" section of Apple’s App Distribution Guide says that

The app successfully launches if the app’s bundle ID matches the App ID, the signature matches the distribution certificate, and the device is in the device list of the ad hoc provisioning profile.

So I guess technically an AppStore builds meet these Ad Hoc requirements because it too is signed with the same distribution certificate. The use of "the" is misleading here because it makes it sound like iOS consults your embedded.mobileprovision, which is untrue. It should read "an" ad hoc profile.

NB: The install only worked when the Ad Hoc profile was already installed on the device, so that’s one reason to make separate ad hoc builds.

NB: This is all conjecture, another explanation could be that Xcode handles the installation of the embedded.mobileprovision and now continues when the AppStore profile installation fails.

This raises another question for me: why does iOS DWIM for App Store builds yet refuses to launch Ad Hoc builds with expired provisioning profiles when a perfectly valid replacement is installed?

这篇关于为什么我可以直接在我的设备上安装应用商店发行版?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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