Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode building and resources folders

I have several resources in my iPhone app and when they get compiled they all get added to the root of the resources folder in the app regardless of the Xcode grouping structure. This is fine for most things, however there is a set of files that I need to have structured in folder in the app's resources folder.

At the moment, I have added my folders to Xcode using "Add Existing Files... -> Create Folder References for Added Folders". This is fine and the folder icons in Xcode are blue instead of yellow. My problem is that Xcode is not noticing and new or changed files within those folders and hence when I build my project, none of the new or changed images are in the target app's resources. The only way I can get it to work is to do a clean, and then build, which is quite annoying as I'm making changes and re-compiling maybe a few times a minute sometimes!

My folder structure in my resources that I want kept on in the app consists of several nested files and folder.

Is there some way to get Xcode to recognise all the files and folders that have changed or are new?

Thanks,

Mike

like image 618
Michael Waterfall Avatar asked Sep 17 '09 13:09

Michael Waterfall


2 Answers

My problem is that Xcode is not noticing and new or changed files within those folders and hence when I build my project, none of the new or changed images are in the target app's resources.

This is a long-standing bug; it's bitten me many times while working on Adium. Please file it in RadarWeb. And thanks for the reminder; I've filed my own bug report as x-radar://problem/7232149 (visible to the public in OpenRadar). You should mention this bug number in your own bug report.

As a workaround, you can right-click on the folder reference and choose “Touch” to tell Xcode that the folder has changed.

like image 156
Peter Hosey Avatar answered Oct 14 '22 20:10

Peter Hosey


i had your first problem myself today and i found this great article, which speaks about the second problem also: http://majicjungle.com/blog/?p=123

like image 35
Cristi Băluță Avatar answered Oct 14 '22 22:10

Cristi Băluță