Hello,
Using Xcode 4.2, I have the two following issues using an application created from the "iOS Empty Application" sample.
I only added a text file existence check and a console output of the contents of this file if it exists.
1.
I add a text file to my application target, which automatically adds it to the Copy Bundle Resources build phase.
I then build and run the application and notice the file is present.
I remove the same file from my project, which automatically removes it from the Copy Bundle Resources build phase.
I then build and run again. I expect my application to notice that the file is gone but it is still there. I have to both clean the project and remove the application from the device to have the file removed for the next debug sessions.
2.
A resources folder named "Folder" is located on a remote Windows computer on my network. It contains a single text file.
I add it to the Copy Bundle Resources build phase using the "Add Other..." button.
I then build and run and "Folder" is copied properly into the application bundle. I am able to output the text file's contents. I stop the debug session.
I now update these contents from the Windows computer, save the file and close it.
I build and run the application again in Xcode: the file has not been updated in the application bundle and the application still shows the contents of the file's previous version.
However, the file is updated properly in the application bundle if the Copy Bundle Resources build phase references:
- a local file
- a local folder that contains the file
- a remote file on a Windows computer
- a remote folder that contains the file on a Mac computer
This makes me think that Xcode only checks for the last modification date of the folder being referenced, and does not check its contents. On Mac OS X, the last modification date of a folder is updated if its contents change. On Windows, it does not.
In situations 1 and 2, I'd expect a complete synchronization between what is listed in the Copy Bundle Resources build phase and the contents of the application bundle on the device.
Have you encountered the same issues? How did you solve it? Should I file a bug report? Am I missing a setting that forces the synchronization?
Thanks!
(This is cross-posted with the following thread on the Apple Developer Forums, sorry if it is bad practice: https://devforums.apple.com/thread/136109)