当我尝试在 Xcode 中重构时,出现将文件添加到此工作区中目标的构建阶段的警告 [英] When I try to refactor in Xcode, a warning to add the file to the build phase of the target in this workspace appears
本文介绍了当我尝试在 Xcode 中重构时,出现将文件添加到此工作区中目标的构建阶段的警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试通过重命名重构代码时,我经常看到此消息:
I am seeing this message, too often when I try to refactor my code by renaming:
***.h 不是此工作区中任何目标的构建阶段的一部分,因此无法重构.将文件添加到此工作区中目标的构建阶段,或在另一个文件中进行选择.
有时,重构仅在重新启动 Xcode 并重新打开项目后才起作用.但是之后就不行了.
Sometimes, refactoring works only right after relaunching Xcode and reopen the project. But it's not working afterwards.
推荐答案
没有成功找到正确的解决方案,我通过在 Organizer > Projects 中反复删除派生数据来处理这种情况
Not succeeding in finding the right solution, I dealt with this situation by repeatedly deleting Derived Data in Organizer > Projects
这篇关于当我尝试在 Xcode 中重构时,出现将文件添加到此工作区中目标的构建阶段的警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文