Force copy Xcode to ALWAYS folder to copy resources

OK, the situation is quite simple (although not solvable ...):

  • I have a link to a folder in my Xcode project, mainly with HTML / JS / CSS resources, often changing using an external editor.
  • I want this particular folder to be copied to the application package for each assembly without the need to clean up the project (the project is HUGE, so it is unnecessarily recompiling the project is a waste of time).

I tried to add a custom build phase (run the script), either touch to the folder, or by creating a dummy file in the resources folder and deleting it later, but none of this worked.

Any ideas?

+7
ios objective-c xcode cocoa xcode5
source share
2 answers

Which finally helped me:

  • Create a Run Build Script Phase Before Copy Bundle Resources
  • Install Script as follows:

     find "${SRCROOT}/path/to/resources/$1" -type f -print0 | xargs -0 touch 
+4
source share

I tested that if you change the date the file was last modified at the moment, Xcode will create a newer file in the bundle.

A new step in building a script with a script, the script should run before Copy Bundle Resources .

enter image description here

List each resource file in a script and use touch -m filename .

+1
source share

All Articles