企业应用程序下载无法连接到“网站地址”错误

问题描述 投票:7回答:4

我创建了一个Ad Hoc企业版。

我使用了以下内容

  • 保存企业或AD Hoc部署
  • 选择我的分发证书
  • 保存为“MyAppName”
  • 选择“保存企业开发”
  • 应用程序URL“https://www.myurl.com/app/
  • 标题“MyAppName”

之后我将构建上传到我的网站

我创建了一个看起来像这样的index.html页面。

<!DOCTYPE html>
<html>
<body>

<a href="itms-services://?action=download-manifest&url=itms-services://?action=download-manifest&url=https://www.myurl.com/app/MyAppName.plist" id="text">Download Here!</a>

</body>
</html>

然后,当我将iPad的Safari浏览器指向该URL并单击我所做的链接时,我会看到一个错误

“无法连接到www.myurl.com”

现在我给的地址最初是“HTTP”,当我请求“HTTPS”时,由于企业规则中的7.1更新,托管公司告诉我它也支持“HTTPS”,所以我不确定这是否是导致问题的原因?或者如果它与我的设置有关?

更新1

我一直在做很多阅读,并设法找到一个有用的链接苹果iOS_Deployment_Technical_Reference最后几页是最有帮助的。

所以我已经意识到我在index.html文件中放置的链接是不正确的...我试图直接链接到我的应用程序,我以为我已经读过某个地方,当你创建存档构建清单时。 plist生成并放在.ipa文件中。据我所知,在阅读苹果部署文档后,这是错误的。

该链接应该指向您还添加到您的web目录的manifest.plist文件,清单文件告诉您的iDevice下载应用程序的位置以及一些其他详细信息。

在iOS_Deployment_Tecgnical_Refrence的底部是一个示例manifest.plist文件,我现在已经编辑并添加到我的web目录中,我已经更新了我的index.html href以指向清单文件。

其次,我从浏览器下载了网站证书并通过电子邮件发送到我的iPad,并参考了@borrrden评论进行了安装。

完成上述所有操作后,当我点击iPad上的链接“无法连接到www.thewebsitesname.com”时,我仍然会收到错误消息,其中唯一的选项是单击“确定”。

这是任何其他感兴趣的网络清单的示例。

<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/
DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0”>
<dict>
 <!-- array of downloads. -->
 <key>items</key>
 <array>
 <dict>
 <!-- an array of assets to download -->
 <key>assets</key>
 <array>
 <!-- software-package: the ipa to install. -->
 <dict>
 <!-- required. the asset kind. -->
 <key>kind</key>
 <string>software-package</string>
 <!-- optional. md5 every n bytes. will restart a chunk if md5 fails. -->
 <key>md5-size</key>
 <integer>10485760</integer>
 <!-- optional. array of md5 hashes for each “md5-size” sized chunk. -->
 <key>md5s</key>
 <array>
 <string>41fa64bb7a7cae5a46bfb45821ac8bba</string>
 <string>51fa64bb7a7cae5a46bfb45821ac8bba</string>
 </array>
 <!-- required. the URL of the file to download. -->
 <key>url</key>
 <string>https://www.example.com/app/AppName.ipa</string>
 </dict>
 <!-- display-image: the icon to display during download.-->
 <dict>
 <key>kind</key>
 <string>display-image</string>
 <!-- optional. indicates if icon needs shine effect applied. -->
 <key>needs-shine</key>
 <true/>
 <key>url</key>
 <string>http://www.example.com/image.57x57.png</string><
 </dict>
 <!-- full-size-image: the large 512x512 icon used by iTunes. -->
 <dict>
 <key>kind</key>
 <string>full-size-image</string>
 <!-- optional. one md5 hash for the entire file. -->
 <key>md5</key>
 <string>61fa64bb7a7cae5a46bfb45821ac8bba</string>
 <key>needs-shine</key>
 <true/>
 <key>url</key><string>http://www.example.com/image.512x512.jpg</
string>
</dict>
 </array><key>metadata</key>
 <dict>
 <!-- required -->
 <key>bundle-identifier</key>
 <string>com.example.fooapp</string>
 <!-- optional (software only) -->
 <key>bundle-version</key>
iOS Deployment Technical Reference Guide
 44 <string>1.0</string>
 <!-- required. the download kind. -->
 <key>kind</key>
 <string>software</string>
 <!-- optional. displayed during download; typically company name -->
 <key>subtitle</key>
 <string>Apple</string>
 <!-- required. the title to display during the download. -->
 <key>title</key>
 <string>App Name</string>
 </dict>
 </dict>
 </array>
</dict>
</plist>

我的问题就在于此,您是否应该自己生成manifest.plist文件?或者有没有办法从xcode做到这一点?其次,当我选择链接并收到无法连接到网站地址时,有什么原因可能导致此错误?

ios objective-c ipad adhoc
4个回答
6
投票

事实证明我的清单文件是完全错误的。我用这个作为例子。

http://gknops.github.io/adHocGenerate/

因此,对于您上传的网页

  • myApp.ipa
  • manifest.plist
  • 的index.html

希望这可以帮助。


3
投票

我遇到了同样的问题,但按照以下步骤解决了问题。

在配置的站点服务器中添加了以下MIME类型。

扩展名.plist

MIME类型text / xml

扩展.ipa

MIME类型application / octet-stream

html的

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>App Name</title>
</head>

<body>
    <p><b>iOS App: Demo App</b></p>
<p>
    <a href="itms-services://?action=download-manifest&url=https://www.server.com/appname.plist">
        click this link to install
    </a>
</p>

</body>
</html>

的.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<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>https://www.server.com/Adhoc/Addhocdemo.ipa</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>com.companyname.appname</string>
                <key>bundle-version</key>
                <string>1.0</string>
                <key>kind</key>
                <string>software</string>
                <key>title</key>
                <string>AdHoc Demo</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>

在IOS版本10.3.1中工作正常,但在IOS设备的IOS版本低于10.3时失败了。


2
投票

我收到了相同或非常相似的错误。

我的决心是在Internet Information Services(IIS)托管的网站上添加适当的mime类型。

即,“。ipa”和“.plist”。

enter image description here


1
投票

我有这个问题,结果是.ipa文件名中的空格。删除了空间,它安装得很好。

© www.soinside.com 2019 - 2024. All rights reserved.