Search code examples
swiftxcodeios-frameworksxcode10

Suddenly headers in headers not found <module-includes>:1:9: note: in file included from <module-includes>:1: Xcode


I have been working for a while on a project that implements a custom framework that uses a C library. The framework is written in Swift and I created a module to expose the C headers to swift. The framework was started in a different project, the framework project was then copied to the root of my app project and it was added to my app project as embedded binary. By doing that I aimed to develop the framework, which it is a git submodule of my app project, while I was coding the app.

Project structure

The framework, as I said, uses a C library and I have the .a files for both debug and release and it provides with a headers include folder. So in my framework project I have the following structure:

Framework Project structure include

and for the static libs

enter image description here

The static libraries where imported as framework and the "library search path" modified for using debug or release. The header search header path was also modified by adding the root folder where all the includes are located.

The Module is located in a folder inside the product folder and defined as:

Module

enter image description here

So that has worked until today. Maybe it was wrong but it never complained. So the headers are found but the headers inside the headers can't be found.

Error

enter image description here

What am I doing wrong?

I have tried to include as many information as I could. I hope it will be enough.

Thank you.


Solution

  • Well, I think what caused the problem. If I am wrong please let me know.

    I have figured out that in "Swift Compiler -> Import Paths", which where I declared my OHNet Module path, you also need to declare the root folder for the "imported headers" so:

    enter image description here

    Clean and Build and the error is gone.