[英]Why does my XCode project include the wrong icon file for my iOS Application?
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. 我正在创建应用程序的精简版,并在此处使用Chris Fletcher的博客作为为多个应用程序设置Xcode项目的指南。 I have everything working great except for the icon file. 除了图标文件,我的一切都很好。
Here is an overview of what I have: 以下是我的概述:
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. 我看了一下我的Lite应用程序的包内容,确定包含了IconPaid文件,但没有包含IconFree文件。 I took it a step further, and printed out the value for the CFBundleIconFile in my app, and it correctly shows up as "IconFree". 我更进一步,在我的应用程序中打印出CFBundleIconFile的值,它正确显示为“ IconFree”。
So my question - Where else is the icon file referenced in a Xcode project besides the plist file? 所以我的问题 - 除了plist文件之外,Xcode项目中引用的图标文件还有哪些? I thought that was the only place... 我以为这是唯一的地方......
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. 在Targets / Project-Name / Copy Bundle Resources下查看并检查免费版本是否正在复制正确的图标文件。
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). 我不确定为什么IconPaid.png会在免费应用程序中显示(假设您的免费目标的构建设置引用了正确的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. 您可能希望清除所有目标并删除中间构建文件,并从模拟器或设备中删除旧版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.