Umbrella header imported into generated swift header

I have a framework with both Swift and Objective-C code. For some reason, the compiler decided that it was necessary to import the framework's umbrella header in its generated Swift.h file. This is causing duplicate definition errors and preventing me from compiling.


Example:

Framework called "MyFramework"

Swift code generates "MyFramework-Swift.h"

Contents of MyFramework-Swift.h includes this line:

#import <MyFramework/MyFramework.h>


This causes the errors and prevents me from building. Changing random lines of Swift code seems to make it NOT put this line in the Swift.h file, but this is not a working solution for me as I need the line of Swift code in question. It was not causing this error before.


Any hints on how to prevent the compiler from putting its own umbrella header into the generated Swift.h file?

Finaly figured out why this is. The public headers should not be in a folder named the same as the framework you are building. See https://stackoverflow.com/questions/27776497/include-of-non-modular-header-inside-framework-module/67869384#67869384

The reason behind this is not clear to me but renaming the folder fixed the issue. And then in the umbrella header make sure to only use imports <> and not the "" kind.

https://github.com/dooZdev/mixed-swift-objc-framework

Umbrella header imported into generated swift header
 
 
Q