[英]plist not copied into the application bundle
I want to copy a plist into my application bundle with Xcode 4.5.2 (or 4.6). 我想用一个Xcode 4.5.2(或4.6)将一个plist复制到我的应用程序包中。
I select the my.plist, drag it into the project, and make sure its also in the 'Copy Bundle Items' phase in 'Build Phases'. 我选择my.plist,将其拖入项目中,并确保它也在'Build Phases'中的'Copy Bundle Items'阶段。 Nothing red, everything is fine.
没什么红,一切都很好。
When I now compile the project, the my.plist is not copied to the application bundle.I've been trying since hours now. 当我现在编译项目时,my.plist不会被复制到应用程序包中。我已经尝试了几个小时了。
If I now rename the file to my.png, pull the file to Xcode, everything is fine - the my.png file is in the application bundle. 如果我现在将文件重命名为my.png,将文件拉到Xcode,一切都很好 - my.png文件在应用程序包中。
So: why isn't the my.plist file copied to the application bundle but the my.png file? 那么:为什么my.plist文件不是复制到应用程序包而是my.png文件?
Any insight is much appreciated. 任何见解都非常感谢。
EDIT: Thanks for your thoughts! 编辑:谢谢你的想法! It appears to that there is some strange problem with this project.
看来这个项目有一些奇怪的问题。 Any onther (new) project will work as expected here.
任何onther(新)项目都将在此处按预期工作。 By changing the extension from 'plist' to 'plis' everything works fine (well, a workaround I know).
通过将扩展名从“plist”更改为“plis”,一切正常(嗯,我知道的解决方法)。
Check the target membership of the file if you have more than one target in your project. 如果项目中有多个目标,请检查文件的目标成员身份。 If that doesn't do the trick, copy the actual file into your project's directory via Finder and then add it to the project by selecting "add files to..." from within the Xcode project browser.
如果不能解决问题,请通过Finder将实际文件复制到项目目录中,然后从Xcode项目浏览器中选择“将文件添加到...”将其添加到项目中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.