iOS 企业应用无法连接到 example.com。

7

我遇到了一个严重的问题。我正在尝试使企业应用程序上线。使用BetaBuilder,我按照以下步骤进行操作:

myApp.ipa
manifest.plist
index.html

manifest.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://example.com/ios/myapp.ipa</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>com.com.myapp</string>
                <key>bundle-version</key>
                <string>1.0</string>
                <key>kind</key>
                <string>software</string>
                <key>title</key>
                <string>Myapp</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>

还有index.html文件:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>Myapp - Beta Release</title>
</head>
<body>

<div id="container">
  <h1>iOS 4.0 Users:</h1>
  <div class="link"><a href="itms-services://?action=download-manifest&url=https://example.com/ios/manifest.plist">Tap Here to Install</a>
  </div>
</div>

</body>
</html>

我甚至把链接从http改为https,但总是提示:无法连接到example.com。这个设置有什么问题吗?

1个回答

8

移动设备iOS系统OTA分发必须使用已验证的SSL证书进行服务。

现在,为了分发OTA,您必须按照以下步骤操作:

1) 提供链接到包含应用程序下载清单的生成.plist文件。该链接必须通过已验证的SSL证书进行服务。有效.plist文件示例如下:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//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://[full download url].ipa</string>
          </dict>
        </array>
        <key>metadata</key>
        <dict>
          <key>bundle-identifier</key>
          <string><full bundle identifier></string>
          <key>bundle-version</key>
          <string>[version string]</string>
          <key>kind</key>
          <string>software</string>
          <key>title</key>
          <string>[software name]</string>
        </dict>
      </dict>
    </array>
  </dict>
</plist>

2).plist文件中的URL键必须由有效的SSL证书提供。

现在我不确定您的服务器设置是否正确,但有可能Web服务器无法正确响应.plist.ipa扩展名。您必须设置Web服务器以理解以下文件扩展名和MIME类型:

  • 扩展名:.plist
  • MIME类型:application/xml

  • 扩展名:.ipa

  • MIME类型:application/octet-stream

我们最初在使应用程序通过空中部署时遇到了许多问题。最大的障碍是SSL证书和MIME类型。

最后一条评论,我相信您拥有自己的域名,并且没有在链接或plist文件中使用example.com。

谢谢。


1
请告诉我一件事。此链接必须通过已验证的SSL证书进行SSL服务。你是什么意思?能否进一步解释一下?服务器上已经添加了SSL证书。请注意,这是一个nginx服务器 - Poles
1
SSL证书必须来自受信任的证书颁发机构。自签名证书无效。还请参阅苹果故障排除指南。https://developer.apple.com/library/ios/technotes/tn2319/_index.html - Nico
好的,请告诉我一件事。在安装应用程序时,SSL证书是否会首先被安装,或者在iOS设备上不需要安装证书? - Poles
SSL不需要安装到iOS设备中。证书必须在Web服务器上。 - Nico
你能帮我解决我的问题吗?请在http://stackoverflow.com/questions/39206022/using-azure-blob-storage-for-installing-ios-apps找到它。 - praveen seela
即使在设备上安装了自签名证书,它们仍然无法正常工作吗? - Luís Cunha

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接