@import causes parse issue: "could not build module"

jeeeyul picture jeeeyul · Apr 14, 2015 · Viewed 22.6k times · Source

After updating with Xcode 6.3, I found something strange things with my projects.

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:

error

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.

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.

I tried:

  • Delete derived data
  • Full Clean
  • Reboot

Any clues are welcomed. Thanks!

Answer

kwz picture kwz · Aug 31, 2015

It looks like turning on: Allow Non-modular Includes In Framework Modules solved this issue for me.