Tell Xcode Not to Compile a FileTweet
Editor’s Note: To read more about compile options and file date/time stamps, please head over to this post: Touch or Untouch a File in Xcode.
By default, when you create a new file or import a file into Xcode, if the file type is recognized as a source file (.c, .m .js, etc), the file is added to the Compile Sources folder in the application target.
There is a simple fix, drag/drop the offending file(s) from the Compile Sources folder to the Copy Bundle Resources folder within the applications Target, which will simply include the file in the application bundle with no processing of the file (this is where you will typically see image files, sound files, etc).
In the image below, the file foo.js has been moved into the Copy Bundle Resources folder: