开发者

IPHONE - groups and folders

I have a folder structure that I would like to have in my bundle.

If I create groups on Xcode and drag files to them, these groups are not real folders and the files will be all placed at the same place.

Then I tried dragging the folders from finder directly to the project on开发者_运维技巧 Xcode. This time, folders were created inside the project structure, but when I compile the application, the final executable doesn't contain the file structure and all files are scattered on the same place. The problem is that when I try to access a directory as I have created, the app crashes, because the final app doesn't have them.

How do I force Xcode to generate a final executable that contains this structure of directories?

thanks


Create the directory with the Finder, and drag it to XCode.
In the dialog, choose «Folder reference», instead of «group». It will tell XCode it's a real directory.
Finally, also ensures the directory is added to the «Copy files» build phase of your application's target.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜