xcode 如何在 iPhone iOS 4 上通过无线应用程序分发解决“无法连接到服务器”消息

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3190796/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 19:31:15  来源:igfitidea点击:

How to solve "Cannot connect to server" message with wireless app distribution on iPhone iOS 4

iphonexcodeios4

提问by Chris Brandt

I found the pre-release docs for this at https://developer.apple.com/iphone/prerelease/library/featuredarticles/FA_Wireless_Enterprise_App_Distribution/Introduction/Introduction.html(Developer account required)

我在https://developer.apple.com/iphone/prerelease/library/featuredarticles/FA_Wireless_Enterprise_App_Distribution/Introduction/Introduction.html找到了预发布文档(需要开发者帐户)

and some more at: http://jeffreysambells.com/posts/2010/06/22/ios-wireless-app-distribution/

还有一些在:http: //jeffreysambells.com/posts/2010/06/22/ios-wireless-app-distribution/

I'm running into issues when I click on the link to the .plist file

单击 .plist 文件的链接时遇到问题

<a href="itms-services://?action=download-manifest&url=https://www.server.edu/iphone/calcs.plist">Install My App over the air</a>

-- the iOS4 device reports back:

-- iOS4 设备报告:

Cannot connect to www.server.edu

无法连接到 www.server.edu

Server names intentionally obscured

故意隐藏服务器名称

Obviously the device can connect to the server otherwise i wouldn't be able to see the page that has the link...

显然设备可以连接到服务器,否则我将无法看到具有链接的页面......

Any suggestions?

有什么建议?

采纳答案by Christopher Pickslay

I haven't run into this, but the first place I'd look is the web server access logs at www.server.edu, to see if a) the request is getting to the server, and b) it's returning an error. I'd bet that the server doesn't like something about the HTTP request coming from the device. Missing cookie? Authentication required? Expecting a particular "Accept" header?

我没有遇到过这种情况,但我首先要看的是 www.server.edu 上的 Web 服务器访问日志,以查看 a) 请求是否到达服务器,以及 b) 是否返回错误。我敢打赌,服务器不喜欢来自设备的 HTTP 请求。缺少饼干?需要认证吗?期待一个特定的“接受”标头?

回答by Robert Bentley

This happened to me because the SSL certificate had expired. Make sure you add that to the list of things to check. Once I renewed that it started working again.

这发生在我身上,因为 SSL 证书已过期。确保将其添加到要检查的事项列表中。一旦我更新它再次开始工作。

回答by jinsong lu

I run into the same problem. It turns out there is a typo in the plist file. Acutally, you don't need to create this plist file. If you are using XCode to distribute, it will generate the right plist file with the ipa file. Follow the following steps: 1. Sign your app with the enterprise distribution certificate. 2. Once you create the archive, go to Organizer, select the archive and click Distribute. 3.select "Save for Enterpise or Ad-Hoc Deployment" and click next. 4. Make sure you select the right code signing identity, the same certificate for in house distribution and click next. 5. When prompted for save, check "Save for Enterprise Distribution". It will ask for more information. 6. Application URL must be the url pointing to your ipa file when deployed in your app distribution server. You will need to have another two image files (required as 512*512 and 57*57). 7. When clicked save, plist file and ipa file will be created in the folder you chooose.

我遇到了同样的问题。事实证明 plist 文件中有一个错字。实际上,您不需要创建这个 plist 文件。如果您使用 XCode 分发,它将生成正确的 plist 文件和 ipa 文件。请按照以下步骤操作: 1. 使用企业分发证书为您的应用程序签名。2. 创建存档后,转到管理器,选择存档并单击分发。3.选择“Save for Enterprise or Ad-Hoc Deployment”,点击下一步。4. 确保选择正确的代码签名身份,内部分发的相同证书,然后单击下一步。5. 当提示保存时,选中“保存用于企业分发”。它会询问更多信息。6. 应用程序 URL 必须是在您的应用程序分发服务器中部署时指向您的 ipa 文件的 URL。您将需要另外两个图像文件(要求为 512*512 和 57*57)。7. 点击保存后,将在您选择的文件夹中创建 plist 文件和 ipa 文件。

Official Guide: http://developer.apple.com/library/ios/#featuredarticles/FA_Wireless_Enterprise_App_Distribution/Introduction/Introduction.html

官方指南:http: //developer.apple.com/library/ios/#featuredarticles/FA_Wireless_Enterprise_App_Distribution/Introduction/Introduction.html

回答by Antaresm

Check authentication on your server on this page and plist file request. Because cookies of your browser do not send them to itunes on device. Your plist file must be available without auth.

在此页面和 plist 文件请求上检查服务器上的身份验证。因为您浏览器的 cookie 不会将它们发送到设备上的 iTunes。您的 plist 文件必须无需身份验证即可使用。