如何为通用 iPhone/iPad 应用程序指定两个图标? [英] How do I specify both icons for a universal iPhone/iPad app?

查看:36
本文介绍了如何为通用 iPhone/iPad 应用程序指定两个图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望创建一个同时支持 iPhone 和 iPad 的应用程序.该应用程序可根据需要在两种设备的模拟器中运行.现在我正在尝试构建和部署它.我将 plist 中的图标文件"设置为 57x57 .png 图像,当我构建并尝试提交应用程序时,ItunesConnect 抱怨 iPad 需要 72x72 .png 图像.如果我为 72x72 .png 指定图标文件",ItunesConnect 会抱怨 iPhone 需要 57x57 的图像.如何在一个 plist 中指定两个图标?

I hope to create a single app that supports both the iPhone and the iPad. The app works in the simulator for both devices as desired. Now I'm trying to build and deploy it. I set the "Icon File" in the plist to the 57x57 .png image and when I build and try to submit the app ItunesConnect complains about needing a 72x72 .png image for the iPad. If I specify the "Icon File" to the 72x72 .png ItunesConnect complains about needing a 57x57 image for the iPhone. How do I specify both icons in a single plist?

推荐答案

将 Array 类型的 CFBundleIconFiles 键添加到您的 Info.plist.该数组应包含 2 个字符串项:两个图标的文件名.然后,操作系统会根据每个平台的像素尺寸自动为每个平台选择正确的图标.

Add a CFBundleIconFiles key of type Array to your Info.plist. The array should contain 2 string items: the filenames of the two icons. The OS will then automatically choose the correct icon for each platform based on their pixel dimensions.

您可以保留 CFBundleIconFile 键并将其指向 iPhone 的图标文件以兼容 3.0/3.1.

You can keep the CFBundleIconFile key and have it point to the icon file for the iPhone for 3.0/3.1 compatibility.

2010 年 5 月更新:Apple 现在有技术说明对此进行了详细解释:技术问答 QA1686 – iPad 和 iPhone 上的应用程序图标

这篇关于如何为通用 iPhone/iPad 应用程序指定两个图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆