【问题标题】:iOS App: Enterprise Distribution/Deployment - Missing app.plistiOS 应用程序:企业分发/部署 - 缺少 app.plist
【发布时间】:2017-05-17 10:44:44
【问题描述】:

我在部署企业 iOS 应用程序时遇到问题。

这里是从网络服务下载应用程序的示例链接:'itms-services://?action=download-manifest&url=https://location.company.com/sites/mobile/Files/Mobile/deploy/app.plist'。

我在同一个网络服务器上托管了一个 html 和 ipa 文件。

当我尝试从服务器下载应用程序时,出现错误:

“无法连接到服务器”

Xcode 中的设备日志显示,如下日志:
TOM-iPhone itunesstored[106]:无法加载下载清单并出现基本错误:Error Domain=SSErrorDomain Code=2 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}

这表明在以下位置缺少 app.plist 错误 https://location.company.com/sites/mobile/Files/Mobile/deploy/app.plist

如何创建新的应用 plist?

Here 我看到了示例 plist,但是如何为我的应用创建 plist?

【问题讨论】:

    标签: ios xcode deployment plist enterprise-distribution


    【解决方案1】:

    如果你要通过网络服务器像这样分发 OTA(无线),基本上你必须有清单文件

    app.plist 是一个清单文件

    清单是一个基于 XML 的属性列表(.plist 扩展名),它应该包含以下六个键/值对:

    • 网址

    指向 .ipa 文件的完全限定 URL

    • 显示图像

    一个完全限定的 URL,指向下载和安装期间使用的 57×57 像素(iPad 为 72x72)PNG 图标

    • 全尺寸图片

    指向代表 iTunes 应用的 512×512 像素 PNG 图像的完全限定 URL

    • 捆绑标识符

    应用的标准应用标识符字符串,在应用的 .plist 文件中指定

    • 捆绑版本

    应用的当前捆绑版本字符串,在应用的 .plist 文件

    • 标题

    人类可读的应用程序名称

    使用 Xcode

    • 在 XCODE Archives organizer 中,选择用于制作 ipa 的 archive

    • 点击导出 按钮,选择Save for Enterprise Deployment,并点击Next。

    Finder 显示具有 .ipa 扩展名的导出文件。

    • 查看构建选项,然后单击下一步。 检查包括无线安装清单

    • 在出现的分发清单信息对话框中输入有关您的网络服务器的详细信息,然后点击导出。

    • 输入 iOS 应用文件的文件名和位置,然后单击导出。

    您必须将 PLIST 重命名为 app.plist 并复制到

    https://location.company.com/sites/mobile/Files/Mobile/deploy/

    自己动手

    如果你不想经历繁琐的 xcode 过程,那么这里是最简单的方法

    这是示例清单文件内容,您可以根据我之前解释的键对其内容进行编辑,并将其保存为 app.plist 并复制到

    https://location.company.com/sites/mobile/Files/Mobile/deploy/

     <!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>
                       <key>url</key>
                       <string>http://www.example.com/apps/foo.ipa</string>
                   </dict>
                   <!-- display-image: the icon to display during download. -->
                   <dict>
                       <key>kind</key>
                       <string>display-image</string>
                       <!-- optional. icon needs shine effect applied. -->
                       <key>needs-shine</key>
                       <true/>
                       <key>url</key>
                       <string>http://www.example.com/image.57×57.png</string>
                   </dict>
                   <!-- full-size-image: the large 512×512 icon used by iTunes. -->
                   <dict>
                       <key>kind</key>
                       <string>full-size-image</string>
                                  <!-- optional. icon needs shine effect applied. -->
                       <key>needs-shine</key>
                       <true/>
                       <key>url</key>
                       <string>http://www.example.com/image.512×512.png</string>
                   </dict>
               </array><key>metadata</key>
               <dict>
                   <!-- required -->
                   <key>bundle-identifier</key>
                   <string>com.example.fooapp</string>
                   <!-- optional (software only) -->
                   <key>bundle-version</key>
                   <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>Example Corporate App</string>
               </dict>
           </dict>
       </array>
    </dict>
    </plist>
    

    附言

    确保您的网站配置为在 Web 服务器中支持以下两种 MIME 类型

    • .ipa 应用程序/八位字节流

    • .plist 文本/xml

    执行此操作后,如果您在安装应用程序时遇到问题,请参考此link 这会对您有所帮助

    希望这会有所帮助:)

    【讨论】:

      【解决方案2】:

      plist 文件只是一个 xml 文件。您可以复制 xml/plist 并替换值(软件包、全尺寸图像、显示图像等)。

      最重要的部分是软件包位置:

      <dict>
          <key>kind</key>
          <string>software-package</string>
          <key>url</key>
          <string><!-- Your IPA file location here --></string>
      </dict>
      

      其他字段主要是元数据。

      要通过 Xcode 创建 plist 文件,请参阅 Apple 文档:https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/DistributingEnterpriseProgramApps/DistributingEnterpriseProgramApps.html

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-04-06
        • 2023-04-10
        • 1970-01-01
        • 2018-07-05
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-09-18
        相关资源
        最近更新 更多