我今天的问题是关于 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?
我肯定错过了一些非常明显的东西。有什么帮助吗?
最佳答案
您检查过“目标”节点吗?如果不是那么;
- 展开“目标”节点和应用程序节点。
- 必须有一个名为“复制捆绑资源”的构建阶段。
- 检查资源是否不在该阶段。
您还可以尝试对项目执行全面清理,以确保不保留任何临时文件。
关于iphone - Xcode 不会释放资源文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2629747/