【问题标题】:cannot connect to example.com in iOS enterprise app无法在 iOS 企业应用程序中连接到 example.com
【发布时间】:2015-04-10 11:02:49
【问题描述】:

我面临一个严重的问题。我正在尝试制作一个企业应用程序。通过使用 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。但它总是说:Cannot connect to example.com。设置有什么问题?

【问题讨论】:

    标签: ios ssl-certificate ios-enterprise


    【解决方案1】:

    必须使用带有经过验证的 SSL 证书的 SSL 来提供无线 iOS 分发。

    现在要分发 OTA,您必须按照以下步骤操作。

    1) 提供指向您生成的.plist 文件的链接,该文件包含应用程序下载的清单。此链接必须通过 SSL 提供,并带有经过验证的 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 证书提供。

    现在我不是 100% 的服务器设置,但 Web 服务器可能无法正确响应 .plist 扩展以及 .ipa 扩展。您必须设置您的网络服务器以理解以下文件扩展名 \ mime-type:

    • 分机号:.plist
    • MimeType:application/xml

    • 分机号:.ipa

    • MimeType:application/octet-stream

    起初,我们在无线部署应用程序时遇到了很多问题。最大的障碍是 SSL 证书和 MimeTypes。

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

    干杯..

    【讨论】:

    • 请告诉我一件事。 此链接必须通过 SSL 和经过验证的 SSL 证书提供。 这是什么意思> 你能进一步解释一下吗?已将 SSL 证书添加到服务器。请注意,它是一个 nignx 服务器。
    • SSL 证书必须来自受信任的证书颁发机构。自签名证书无效。另请参阅 Apple 故障排除指南。 developer.apple.com/library/ios/technotes/tn2319/_index.html
    • 好的,告诉我一件事。安装应用时,是先安装SSL证书还是在ios设备上不需要安装证书。
    • SSL 不需要安装到 iOS 设备中。证书必须在 Web 服务器上。
    • 你能帮我解决我的问题吗?请找到它@stackoverflow.com/questions/39206022/…
    猜你喜欢
    • 2019-08-10
    • 2014-11-02
    • 2022-09-27
    • 2023-04-10
    • 1970-01-01
    • 1970-01-01
    • 2013-09-11
    • 2022-08-23
    • 1970-01-01
    相关资源
    最近更新 更多