Wrapping 3rd party objective c framework into 1st party swift framework

Hi All,


Use case -

I am trying to wrap a 3rd party objective c framework inside an 1st party swift framework so that client only have to import the swift framework.


Project structure

My framework has few objective c files which uses the 3rd party objective c framework header files. I have forward declared all the 3rd party objective c framework headers in my objective c header files.


Problem -

So one of objective c file inside my framework has protocol that has a type defined inside the 3rd party objective c framework.


So if try to conform to that protocol from a swift files created inside my swift framework then that gives me an error that "cannot conform to protocol because it has reqiirments that cannot be satisfied".

But if i try to conform to the same protocol using an objective c file again created inside my framework then it works.


Apperently reason for this is that the 3rd party header files that are forward declared inside objective c file present in my framework is able to infer that 3rd party header types but swift can't.

Now one of the solutions here is to not use the swift file at all and use objective c files only but i don't want to do that. So any suggestions

here would be grealty appreciated.


Thanks in advance.