开发者

XIB Files in Classes folder, is it a problem?

So in my XCode project I have a handful of XIB files that for one reason or another are physically in the Classes folder on the filesystem, but show in the Resources folder in XCode. Is there any problem with that? Should I bother trying to move them?

The code is working fine, runs on simulator and device, so my main c开发者_如何学Gooncern is whether it will cause any problems when I submit to Apple, or anywhere else down the road.


It's absolutely meaningless - the only thing that affects your final product (and therefore what you submit to Apple) is which stage of your Target the different files appear under, and in my experience those rarely end up wrong.

However, for tidiness' sake if nothing else, it might be worth fixing the problem. Move the files to the right place*, which will turn the filename red in XCode. Choose Get Info on each red file and click the "Choose" button to locate it.

(* if you're using Subversion, use the svn move command for this, not the Finder)


All the resource files are stored in a flat directory in app bundle. You can control click on .app file and see the flat directory by selecting reveal in finder. It really does not matter where the file is physically present in source. If you don't have any problem with the management of the code by placing some resource files in class directory, then there will be no problem. That means Apple will not mind.

However if you are planning to maintain the project for a long time with multiple people then I think it is better to have well organized source.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜