我今天的问题是关于Xcode如何处理它创建的应用程序包中的资源文件。我知道这可能是微不足道的,但我找不到一个简单的方法。 基本上我的问题是,即使文件已从项目中删除,Xcode似乎仍然在应用程序包中包含资源文件(例如文本文件)。 这里详细介绍了这里发生的事情。Xcode不会放开资源文件
⁃ Added a file to the project (both by choosing file - new file or dragging a file to the Xcode groups and files left column checking add to project folder if needed checkbox)
⁃ Compiled and launched the project in simulator
⁃ Verified that the file is present in myApp.app bundle, located in User/Library/Application/Support/iPhone Simulator/3.2/Applications/<application system number>/myApp.app and even in <my Xcode projects folder>/myApp/build/debugiPhonesimulator/myApp.app
⁃ Deleted the file from groups and files column in Xcode
⁃ Deleted the actual file with Finder in <my Xcode projects folder>/myApp/myFile
⁃ Deleted User/Library/Application/Support/iPhone Simulator/3.2/Applications/<application system number>/myApp.app and even <my Xcode projects folder>/myApp/build/debugiPhonesimulator/myApp.app
⁃ Emptied the trash
⁃ Verified that there is no reference to the file with Finder spotlight
⁃ Verified that there is no reference to the file with Xcode search
⁃ Rebuilt and relaunched the app in simulator
⁃ Verified that a brand new /Library/Application/Support/iPhone Simulator/3.2/Applications/<application system number>/myApp.app has been just created
⁃ Verified the content of /Library/Application/Support/iPhone Simulator/3.2/Applications/<application system number>/myApp.app bundle: the file is still there. Where the h. did Xcode take it from?
我肯定错过了一些非常明显的东西。任何帮助?
如果不清除或删除构建目录,然后将旧的文件不会被删除。构建过程不会从应用程序包中删除文件,它只会添加它们。 – logancautrell 2011-05-10 18:38:49
顶部答案http://stackoverflow.com/questions/5714372/how-to-empty-caches-and-clean-all-targets-xcode-4有一个更好的解决方案的Xcode 4. – 2011-12-28 23:40:01