当我尝试在 Xcode 中重构时,会出现一条警告,要求将文件添加到此工作区中目标的构建阶段



当我尝试通过重命名来重构代码时,我经常看到这条消息:

***.h is not part of the build phase of any targets in this workspace and so can’t be refactored. Add the file to the build phase of a target in this workspace, or make a selection in another file.

有时,重构仅在重新启动 Xcode 并重新打开项目后立即起作用。但之后就不起作用了。

由于没有成功找到正确的解决方案,我通过反复删除管理器>项目中的派生数据来处理这种情况

最新更新