iOS企业部署:单击itms-services链接,结果为“无法连接到[domain]".错误 [英] iOS Enterprise Deployement: Clicking on itms-services link results in "Cannot connect to [domain]" error

查看:232
本文介绍了iOS企业部署:单击itms-services链接,结果为“无法连接到[domain]".错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了部署企业iOS应用,我创建了以下链接:

In an effort to deploy an enterprise iOS app, I've created the following link:

未编码的版本(为了易于阅读):

Unencoded version (for easy reading):

<a href="itms-services://?action=download-manifest&url=https://example.com/api/distribution/ios?token=abc123">Download</a>

编码版本:

<a href="itms-services://?action=download-manifest&url=https%3A%2F%2Fexample.com%2Fapi%2Fdistribution%2Fios%3Ftoken%3Dabc123">Download</a>

该链接已正确编码,如此处所述a>和此处.

The link is properly encoded, as discussed here and here.

假设用户令牌有效,则通过SSL返回.plist文件,如所讨论的

Assuming the user's token is valid, a .plist file is returned via SSL, as discussed here. The URL of the .ipa file referenced in the .plist file is generated on the fly. Here is what the .plist file looks like:

<plist version="1.0">
<dict>
    <key>items</key>
    <array>
        <dict>
            <key>assets</key>
            <array>
                <dict>
                    <key>kind</key>
                    <string>software-package</string>
                    <key>url</key>
                    <string>TEMP_URL</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>org.cocos2d.ready-ios</string>
                <key>bundle-version</key>
                <string>0.0.1</string>
                <key>kind</key>
                <string>software</string>
                <key>title</key>
                <string>Ready</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>

据我所知,我们的GoDaddy SSL证书似乎在受信任列表中.

As far as I can tell, our GoDaddy SSL certificate appears to be on the trusted list.

但是,尽管有上述所有情况,但是在点击链接并等待片刻之后,我收到以下错误消息:

However, despite all of the above, after tapping the link and waiting a moment, I receive the following error:

Cannot connect to [domain]

这是点击链接后的iPhone控制台输出:

This is the iPhone console output after tapping the link:

Aug 29 07:30:56 My-iPhone wifid[15] <Notice>: WiFi:[431015456.799163]: Client itunesstored set type to background application
Aug 29 07:30:56 My-iPhone wifid[15] <Notice>: WiFi:[431015456.804319]: BG Application: Not Present, BG Daemon: Present. Daemons: apsd networkd itunesstored 
Aug 29 07:30:56 My-iPhone wifid[15] <Notice>: WiFi:[431015456.806066]: Already connected to [Company Name].
Aug 29 07:30:58 My-iPhone itunesstored[100] <Warning>: Could not load download manifest with underlying error: Error Domain=SSErrorDomain Code=2 "Cannot connect to iTunes Store" UserInfo=0x15788270 {NSLocalizedDescription=Cannot connect to iTunes Store}
Aug 29 07:31:03 My-iPhone wifid[15] <Notice>: WiFi:[431015463.925398]: Client itunesstored set type to normal application
Aug 29 07:31:03 My-iPhone wifid[15] <Notice>: WiFi:[431015463.928745]: BG Application: Not Present, BG Daemon: Present. Daemons: apsd networkd 

有什么想法吗?

推荐答案

我遇到了这个问题,这里或其他答案中没有记载的解决方案对我有用.使用正确的SSL证书,可以毫无问题地将safari中的plist加载到目标设备上.但是,尝试使用"itms-services://..."链接进行安装将始终失败,并显示无法连接到[domain]"错误.

I had this problem and none of the documented solutions here, or in other answers, worked for me. Using a correct SSL certificate, it was possible to load the plist in safari, on the target device with no problems. However, attempting to install using the "itms-services://..." link would always fail with the "Cannot connect to [domain]" error.

问题是未在Web服务器上配置中级 SSL证书. Web浏览器对此没有问题,SSL是有效的,但是将设备连接到Mac并通过XCode的设备"面板查看日志时显示以下错误:

The problem was the intermediate SSL certificate was not configured on the web server. Web browsers had no problem with this, SSL was valid, but connecting the device to a Mac, and viewing the log through the devices panel in XCode showed the below error:

iPhone itunesstored[83] <Warning>: Could not load download manifest with underlying error: Error Domain=NSURLErrorDomain Code=-1202 "Cannot connect to the Store".... "The certificate for this server is invalid. You might be connecting to a server that is pretending to be "[mydomain]", which could put your confidential information at risk."

在Apache上安装中间SSL证书即可解决此问题.

Installing the intermediate SSL certificate on Apache solved this issue.

这篇关于iOS企业部署:单击itms-services链接,结果为“无法连接到[domain]".错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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