Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

xcode

xcode6.3

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!

like image 220
jeeeyul Avatar asked Apr 14 '15 06:04

jeeeyul


3 Answers

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

like image 193
kwz Avatar answered Nov 05 '22 11:11

kwz


Hi this is due to the fact that file which you are making it public in framework header must be public also.

Change from "project" to "public"

like image 4
vivek Avatar answered Nov 05 '22 12:11

vivek


Sometimes this issue can be solved by adding the framework to the same folder as the .xcodeproj file, no subfolders or anything.

Credits to Jonny who points it out as a comment in the question.

like image 3
inigo333 Avatar answered Nov 05 '22 10:11

inigo333