0

I built a framework project that's intended to be used in client applications. The framework is a swift project but mixes in objective c. Because I'm not allowed to have a bridging header in framework projects and I didn't want the objective c classes exposed I used a module map to hide them as explained here: http://nsomar.com/project-and-private-headers-in-a-swift-and-objective-c-framework/

However, this issue is that in my client application there is a protocol that has the same name as a protocol in the framework project which causes this error:

warning: duplicate definition of category
fatal error encountered while reading from module
Cross-reference to module framework

The problem is from the header thats generated from the framework, it mentions the duplicate protocol name like:

@interface MyViewController: (SWIFT_EXTENSION(MyFramework))<DuplicateProtocolName>

So the compiler is getting confused about to duplicate class names. How can I avoid this? To be clear the duplicate protocol is not public in the framework however the name does appear in the header file that's generated for the framework

MobileMon
  • 8,341
  • 5
  • 56
  • 75

0 Answers0