使用 HTTPS 进行应用程序无线安装不起作用
我知道一般情况下通过 HTTPS 安装是有效的,但不知何故它在我的环境中不起作用。
据我了解,itms-service 链接是 HTTP:
itms-services://?action=download-manifest&url=http://' . $_SERVER['SERVER_NAME'] . $downloadLink
.plist 中的链接是 HTTPS
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>https://app.ipa</string>
</dict>
<dict>
<key>kind</key>
<string>full-size-image</string>
<key>needs-shine</key>
<true/>
<key>url</key>
<string>https://image_512x512.png</string>
</dict>
<dict>
<key>kind</key>
<string>display-image</string>
<key>needs-shine</key>
<true/>
<key>url</key>
<string>https://image_57x57.png</string>
</dict>
</array>
但应用程序不会安装。我总是收到消息“无法加载应用程序”
所有 URL 均可通过 HTTP 和 HTTP 访问HTTPS。
XCode显示应用程序日志
未知的安全性[2331]:CFReadStream域:12错误:8
我在这里做错了什么?
谢谢
I know that in general installation via HTTPS is working but somehow it doesn't in my Environment.
The itms-service link is HTTP as far as I understood:
itms-services://?action=download-manifest&url=http://' . $_SERVER['SERVER_NAME'] . $downloadLink
The links in the .plist are then HTTPS
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>https://app.ipa</string>
</dict>
<dict>
<key>kind</key>
<string>full-size-image</string>
<key>needs-shine</key>
<true/>
<key>url</key>
<string>https://image_512x512.png</string>
</dict>
<dict>
<key>kind</key>
<string>display-image</string>
<key>needs-shine</key>
<true/>
<key>url</key>
<string>https://image_57x57.png</string>
</dict>
</array>
But the app won't install. I always get the message "App could not be loaded"
All URL's are reachable with HTTP & HTTPS.
XCode shows the app log
unknown securityd[2331] : CFReadStream domain: 12 error: 8
What am I doing wrong here?
Thx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
关于您如何尝试解决此问题的信息并不多,因此我只是提出问题,而不是实际答案。如果任何一个问题的答案是“否”,那么应该指出您的问题所在的区域。
https://app.ipa
是您在 .plist 中使用的实际 URL ?如果是这样,我会尝试使用完整的主机名和那里的路径。https 站点是否具有 iOS 上的 Safari 接受的正确签名的有效证书,而无需与用户进行任何交互?如果没有尝试正确的证书。
如果检查服务器日志文件,您是否看到从服务器下载了 .ipa 文件?
您是否尝试过使用 iTunes 安装 .ipa 文件,它是否被接受?
There's not a huge amount of information about how you've tried to solve this, so rather than actual answers I just have questions. If the answer to any of the questions is 'no' then should point you at the area your problem is in.
Is
https://app.ipa
the actual URL you're using in the .plist? If so I'd try with the full hostname & path in there.Does the https site have a proper signed valid certificate that Safari on iOS accepts without any interaction with the user? If not try a proper certificate.
Do you see the .ipa file get downloaded from the server, if you check the server log file?
Have you tried installing the .ipa file using iTunes, does it get accepted?
问题是iPad需要知道证书颁发机构。
如果您使用HTTPS分发应用程序并且CA服务器是您自己的,则需要在iPad上安装证书。否则 iOS 将尝试下载它。
您可以通过电子邮件将其发送到您的 iPad 进行安装,或者从钥匙串访问程序创建 .pem 文件并将其托管在您的服务器上以用于安装目的。然后用 Safari 打开它,iOS 会要求你接受它。
然后安装就可以了。但要注意使用 .htaccess,因为在安装过程中同时使用 HTTPS 和 HTTP 似乎会触发每个请求的登录名/密码,其中图像、.ipa 和 .plist 为 4,这确实很烦人。
[编辑]
请记住,自 Apple 推出 iOS 7.1 以来,您只需要使用 HTTPS 来引用 .plist 文件。
请参阅此处:企业应用部署不适用于 iOS 7.1< /a>
The problem is that the Certificate Authority needs to be known by the iPad.
If you distribute Apps with HTTPS and the CA Server is your own, you need to install the certificate on the iPad. Otherwise iOS will try to download it.
You can install it sending it via email to your iPad or create a .pem File from the Keychain Access program and host it on your server for installation purposes. Then open it with Safari and iOS will ask you to accept it.
Then the installation works. But beware of using .htaccess as using HTTPS and HTTP together in the installation process seems to trigger the login/password for every request, which are 4 for images, .ipa and .plist, which is really annoying.
[EDIT]
Please keep in mind that you need to refer to the .plist file only with HTTPS since Apple introduced iOS 7.1.
See here: Enterprise app deployment doesn't work on iOS 7.1