1
4

2 回答 2

11

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

app.plist 是一个清单文件

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

  • 网址

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

  • 显示图像

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

  • 全尺寸图像

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

  • 捆绑标识符

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

  • 捆绑版本

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

  • 标题

人类可读的应用程序名称

使用 Xcode

  • 在 XCODE档案 管理器中,选择用于制作 ipa的档案

  • 单击导出按钮,选择保存以进行企业部署,然后单击下一步。

在此处输入图像描述 在此处输入图像描述

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

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

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

在此处输入图像描述

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

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

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

DIY

如果您不想经历繁琐的 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

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

希望这可以帮助 :)

于 2017-05-24T19:14:45.823 回答
0

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

于 2017-05-24T14:24:12.300 回答