xcode iOS 应用程序:企业分发/部署 - 缺少 app.plist

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44022642/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 09:59:07  来源:igfitidea点击:

iOS App: Enterprise Distribution/Deployment - Missing app.plist

iosxcodedeploymentplistenterprise-distribution

提问by Krunal

I'm facing an issue with deployment of enterprise iOS application.

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

Here is sample link to download app from web service: 'itms-services://?action=download-manifest&url=https://location.company.com/sites/mobile/Files/Mobile/deploy/app.plist'.

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

I hosted an html and ipa files on same web server.

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

When I am trying to download app from server, I am getting an error:

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

“Cannot connect to Server”

“无法连接到服务器”

The device log in the Xcode shows, the below log:
TOM-iPhone itunesstored[106] : Could not load download manifest with underlying error: Error Domain=SSErrorDomain Code=2 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}

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

It's indicating an error for missing app.plistat following location https://location.company.com/sites/mobile/Files/Mobile/deploy/app.plist

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

How can I create new app plist?

如何创建新的应用程序 plist?

HereI saw sample plist but how can I create plist for my app?

在这里我看到了示例 plist 但如何为我的应用程序创建 plist?

回答by Durai Amuthan.H

BASICALLY YOU HAVE TO HAVE MANIFEST FILE IF YOU ARE GONNA DISTRIBUTE OTA(OVER THE AIR) LIKE THIS THROUGH WEB SERVER

基本上,如果您要像这样通过 Web 服务器分发 OTA(空中),则必须有清单文件

app.plist is a manifest file

app.plist 是一个清单文件

The manifest is an XML-based property list (.plist extension) and it should contain the following six key/value pairs:

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

  • URL

    a fully-qualified URL pointing to the .ipa file

  • display-image

    a fully-qualified URL pointing to a 57×57-pixel (72x72 for iPad) PNG icon used during download and installation

  • full-size-image

    a fully-qualified URL pointing to a 512×512-pixel PNG image that represents the iTunes app

  • bundle-identifier

    the app's standard application identifier string, as specified in the app's .plist file

  • bundle-version

    the app's current bundle version string, as specified in the app's .plist file

  • title

    a human-readable application name

  • 网址

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

  • 显示图像

    指向下载和安装过程中使用的 57×57 像素(iPad 为 72x72)PNG 图标的完全限定 URL

  • 全尺寸图像

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

  • 捆绑标识符

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

  • 捆绑版本

    应用程序的当前包版本字符串,如应用程序的 .plist 文件中所指定

  • 标题

    一个人类可读的应用程序名称

Using Xcode

使用 Xcode

  • In the XCODE Archivesorganizer, select the archivethat was used to make ipa

  • Click the Export button, select Save for Enterprise Deployment,and click Next.

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

  • 单击“导出”按钮,选择“为企业部署保存”,然后单击“下一步”。

enter image description hereenter image description here

在此处输入图片说明在此处输入图片说明

The Finder shows the exported that has an .ipa extension.

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

  • Review the build options, and click Next. check Include manifest for over-the-air installation

  • enter details about your web server in the Distribution manifest informationdialog that appears, and click Export.

    enter image description here

  • Enter a filename and location for the iOS App file, and click Export.

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

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

    在此处输入图片说明

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

YOU HAVE TO RENAME THE PLIST AS app.plist AND COPY TO

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

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

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

DIY

DIY

If you don't want to go through the tedious xcode process then here is the easiest way

如果您不想经历乏味的 xcode 过程,那么这里是最简单的方法

Here is the sample manifest file content you can edit it contents according to the keys as I have explained earlier and save it as app.plist and copy to

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

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

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&lt;/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&lt;/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&lt;/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>

P.S

聚苯乙烯

Make sure your website is configured to support the following two MIME types in Web server

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

  • .ipa application/octet-stream

  • .plist text/xml

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

  • .plist 文本/xml

After doing this if you have trouble installing the application please refer this linkit'd be helpful to you

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

Hope this helps :)

希望这可以帮助 :)

回答by calampunay

The plist file is just an xml file. You can copy the xml/plist and replace the values (software-package, full-size-image, display-image, etc).

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

The most important part is the software-package location:

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

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

The other fields are mostly metadata.

其他字段主要是元数据。

To create the plist file through Xcode, see Apple documentation: https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/DistributingEnterpriseProgramApps/DistributingEnterpriseProgramApps.html

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