ios - 使用 plist 文件在 iPhone / iPad 上安装应用程序时如何正确显示图标和进度?
问题描述
我正在开发自己的 AppStore 网站,该网站为公司托管各种企业应用程序。到目前为止,一切正常,除了建议的在 Apple 设备上下载应用程序的方式。
问题是,我没有存档与从官方 Apple AppStore 安装的应用程序相同的效果。在安装应用程序之前,我在主屏幕上看不到应用程序的图标,并且在下载应用程序时看不到任何进度,只有在安装应用程序时才看到。应用程序本身的下载和安装工作。
当一个人选择将应用程序下载到他/她的 iPhone 时,会重定向到 itms 链接,如下所示:
itms-services://?action=download-manifest&url=https://example.org/appdistribution/iOS/myApp/meta.plist
我的 meta.plist 文件如下所示:
<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.org/appdistribution/iOS/myApp/app.ipa</string>
</dict>
<dict>
<key>kind</key>
<string>display-image</string>
<key>needs-shine</key>
<true/>
<key>url</key>
<string>https://example.org/appdistribution/iOS/myApp/icon.png</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.sample-company.myApp</string>
<key>bundle-version</key>
<string>3.0.0</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>MyApp</string>
</dict>
</dict>
</array>
</dict>
</plist>
这是应用程序下载时的外观:
这是安装应用程序时的样子:
安装后,图标就会出现。
我尝试了几种图像分辨率,例如 57x57、72x72、100x100 和 256x256。我已经在 iPhone 和 iPad 上进行了测试。我怀疑下载过程中缺少进度是由于图像无法加载而导致的后续错误。
真正奇怪的是,我可以发誓它以前曾经工作过。这看起来很琐碎,但我不确定这是由什么引起的。有没有很好的例子?
解决方案
您可以使用 BetaBuilder 生成 plist 文件: https ://github.com/HunterHillegas/iOS-BetaBuilder
推荐阅读
- powershell - Powershell脚本,用于根据pdf名称中的5位数字创建单个文件夹
- sql - 如何在 MS Access 中将 LIKE 与具有 NULL 值的日期字段一起使用
- xamarin.forms - 带有并排控件的运行风格应用程序
- bash - 从 bash 脚本调用 MobaXterm 命令
- python - pandas groupby 返回一个布尔向量
- reactjs - 依赖库无法访问相关节点模块导入
- c - ZeroMQ - CZMQ - Majordomo 模式 - 发送 FAST 时丢失请求
- javascript - Gio.Subprocess 中的多个参数
- linux - 通过取变量值循环
- arrays - 如何在bash中从csv转换为数组