为了部署企业iOS应用程序,我创建了以下链接:
未编码版本(便于阅读):
<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>
假设用户的令牌有效,则通过SSL返回.plist文件,如here所述..plist文件中引用的.ipa文件的URL是即时生成的.这是.plist文件的样子:
<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证书似乎在trusted list上.
Cannot connect to [domain]
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:// …”链接进行安装将始终失败,并显示“无法连接到[域]”错误.
问题是Web服务器上未配置中间SSL证书. Web浏览器没有问题,SSL有效,但将设备连接到Mac,并通过XCode中的设备面板查看日志显示以下错误:
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证书解决了这个问题.