为什么我的 XCode 项目包含错误的 iOS 应用程序图标文件?
我正在创建我的应用程序的精简版,并使用 Chris Fletcher 的博客此处作为为多个应用程序设置 Xcode 项目的指南。除了图标文件之外,我的一切都运行良好。
以下是我所拥有的概述:
- 2 个 info.plist 文件(每个应用程序版本一个)
- 在我的付费 info.plist 中,我引用图标“IconPaid”作为图标条目。在我的 Xcode 项目中,我添加了 IconPaid.png 和 [email protected] 。
- 在我的 lite info.pist 中,我引用图标“IconFree”作为图标条目。在我的 Xcode 项目中,我添加了 IconFree.png 和 [email protected] 。
当我去构建这两个应用程序时,我的精简版应用程序会显示付费图标。我查看了 lite 应用程序的包内容,果然包含了 IconPaid 文件,但没有包含 IconFree 文件。我更进一步,在我的应用程序中打印出 CFBundleIconFile 的值,它正确显示为“IconFree”。
所以我的问题 - 除了 plist 文件之外,Xcode 项目中引用的图标文件还在哪里? 我认为这是唯一的地方......
I am creating a lite version of my app, and used Chris Fletcher's blog here as a guide to setting up an Xcode project for multiple apps. I have everything working great except for the icon file.
Here is an overview of what I have:
- 2 info.plist files (One for each version of the application)
- In my paid info.plist, I reference the icon "IconPaid" for the Icon entry. In my Xcode project, I have added IconPaid.png and [email protected].
- In my lite info.pist, I reference the icon "IconFree" for the Icon entry. In my Xcode project, I have added IconFree.png and [email protected].
When I go to build both apps, my lite app shows up with the paid icon. I took a look at the package contents of my lite app, and sure enough the IconPaid files were included but not the IconFree files. I took it a step further, and printed out the value for the CFBundleIconFile in my app, and it correctly shows up as "IconFree".
So my question - Where else is the icon file referenced in a Xcode project besides the plist file? I thought that was the only place...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您的免费目标正在复制图标的付费版本而不是免费版本。查看 Targets/Project-Name/Copy Bundle Resources 下并检查免费版本是否正在复制正确的图标文件。
我不确定为什么 IconPaid.png 显示在免费应用程序中(假设您的免费目标的构建设置引用了正确的 info.plist)。您可能想要清理所有目标并删除中间构建文件,并从模拟器或设备中删除旧版本。
It sounds like your free target is copying the paid version of the icon instead of the free version. Look under Targets/Project-Name/Copy Bundle Resources and check that the free version is copying the correct icon file.
I'm not sure why the IconPaid.png is showing in the free app (assuming your build settings of your free target are referencing the proper info.plist). You may want to clean all targets and delete your intermediate build files too, and delete the old version from your simulator or device.