开发者

What is the correct way to ensure read-only plists are copied to the application build directory?

I have an iPhone application that uses a set of plists to load the data. I found during development that I was getting very strange behaviour whereby XCode did not always read from the latest revision of the list.

I researched this and found that plists are not treated as other files and that up开发者_运维百科dating them may be ignored by XCode. I also found I could fix this by manually dragging the plists to the Copy Bundle Resources list in Targets, but I'd have thought that if Apple really wanted me to do this, they might have XCode add it into that list when the file is added to the project in the first place.

Can anyone tell me what is the correct approach to this problem, please?


Xcode does not automatically copy certain resources and they have to be added manually to the Copy Bundle Resources list in your targets like you said. I find this rather annoying (especially since it seems that only some of my files do this) and im not quite sure if this is a bug or not. I also noticed that xcode usually never adds C source files to the Compile Sources list in Targets in my iPhone projects. Dragging the file into the Copy Bundle Resources should never present a problem unless of course you are creating a file template.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜