@import会导致解析问题:“无法构建模块"; [英] @import causes parse issue: "could not build module"
问题描述
使用Xcode 6.3更新后,我在项目中发现了一些奇怪的东西.
After updating with Xcode 6.3, I found something strange things with my projects.
以下代码导致解析问题,提示无法构建模块'AgendaFramework'",AgendaFramework是我为ios8定制的嵌入式框架:
Below codes causes parse issue that says "Could not build module 'AgendaFramework'", the AgendaFramework is my custom embedded framework for ios8:
@import MyEmbededFramework;
错误标记看起来像这样:
The error marker looks like this:
在未建立索引期间引发了问题.整个建筑可以成功完成,没有任何错误或警告.我可以构建,存档,在设备上运行,部署,提交到App Store.
The issues is raised during indexing not building. Whole building can be performed successfully without any error or warning. I can build, archive, run on device, deploy, submit to App Store.
但是,当我编辑属于该扩展的类时,错误标记就会出现.扩展(窗口小部件)显式链接到嵌入式框架. (我知道使用@import语句时不必这样做.)
However the error marker shows up when I edit the classes that belongs to the extension. The the extension(widget) explicitly linked to the embedded framework. (I know that I don't have to do it when I use @import statement.)
在这种状态下,我无法收到任何有效的内容助手,这很烦人.
In this state, I could not receive any valid content assistant, very annoying.
用旧样式替换导入语句后,问题消失了:
After I replace the import statement with old style, the problem was disappeared:
#import <AgendaFramework/AgendaFramework.h>
我还有其他几个与导致此问题的项目具有非常相似的拓扑的项目,但是它们还可以.只有一个项目导致此问题.我比较了每个细节构建设置,找不到任何线索.
I have several other projects that have very similar topology with the project which causes this issue, But they are okay. Only one project causes this issue. I compared every detail build settings, I could not find any clue.
我尝试过:
- 删除派生数据
- 完全清洁
- 重新启动
欢迎提供任何线索.谢谢!
Any clues are welcomed. Thanks!
推荐答案
它看起来像是在打开: 允许非模块化模块包含在框架模块中为我解决了这个问题.
It looks like turning on: Allow Non-modular Includes In Framework Modules solved this issue for me.
这篇关于@import会导致解析问题:“无法构建模块";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!