我刚刚也被这个bug咬了。 这里给出的答案是一个很大的帮助。
我发现这个其他线程的答案太有用,但我不知道它实际上是做(这似乎产生了新的AppId或东西)安全的东西:
iphone simulator resources not updating
这些是我为解决它而制定的个人笔记。
1) Open the project in Xcode
2) Right-click the folder reference (BLUE folder) in the navigator
at its root and pick "Remove Reference"
3) Close Xcode all the way
4a) Warning, this step might cause other problems in your project.
4b) Open the folder browser/Finder
4c) Navigate to: /users/USERNAME/Library/Application Support/
/iPhone Simulator/version/Applications/THISPROJFOLDER
4d) Delete this whole THISPROJFOLDER. The name of the folder may be all
numbers, but this clears the Xcode "Cache" so it will rebuild things
5) Find the actual folder where you store your pictures that were referenced,
and move the folder elsewhere and rename it.
6) Now open Xcode
7) In Xcode, select Product -> Clean. It should clean successfully.
8) Now run the program through Xcode. It should run, but (hopefully) crash or
otherwise fail because it doesn't detect the resource files you removed.
9) Now go standard Xcode usage and add the files back to the folder you want,
and add a reference to that folder in the Xcode navigator. Run the program
again, and it should detect the UPDATED PDFfiles/Imagefiles.
编辑: 好吧,我跟着上面彼得Hosey的帖子的“答案”的指令,那也可以。可能比我的解决方案更好,因为我的第4步(必需)似乎重新生成了应用程序密钥或其他内容。
因此,这里是我如何修复它在Xcode 4.0以下彼得的帖子:
1) Open your project in Xcode
2) Select the main project root item in the Navigator
3) Select "Build Phases" in the main pane
4) Select "Add Build Phase" button -> "Add Run Script"
5) Reposition he "Run Script" entry bar in the screen,
and move it to just-before the Copy Bundle Resources area
6) Edit the run-script you just added in the main pane:
: Set Shell to: /bin/sh (its the default, or try /bin/tsch)
: Set the script line to: touch -cm ${SRCROOT}/MyDocs
(Set it to your folder root area, matching the Blue Folder
area in your Navigator)
7) Save it all and select "Product -> Clean" to clean project
感谢您的信息。我不相信他们没有解决它!我甚至发现触摸文件夹似乎不起作用,也许是因为涉及到一些嵌套。 – 2009-09-18 17:15:17
迈克尔瀑布:是的;您需要触摸添加到项目中的特定文件夹。触摸它中的任何内容(包括任何子文件夹)都不起作用(或者至少它不是我上次尝试它的时间,这是前一段时间)。 – 2010-11-04 05:39:35
我想添加另一个解决方法。我试图像Peter Hosey说的那样选择触摸,但没有帮助。我所做的就是将该文件夹从项目文件夹中复制出来,删除并移至旧文件夹垃圾箱,重新启动xcode并照常添加文件夹复制文件夹选项。 – Pacu 2011-02-18 19:46:02