Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fail when i use Bridging Headers in swift frameworks

I am doing a swift framework and i want to use old objective c classes. For this, i use the bridging headers method but when i try to build appears this error:

<unknown>:0: error: using bridging headers with framework targets is unsupported

I added my {PROJECT}-Bridging-Header.h to Objective-C Bridging Header in Swift Compiler - Code Generation

How can i solved it?

I did in applications and runs Ok, but in this framework no

Thanks

like image 596
user3086708 Avatar asked Oct 22 '14 15:10

user3086708


1 Answers

iHart is correct

For that follow below steps : 1. remove your bridging header and all related file . . . 2. Clean Build/Solution. Cmd + Shift + k like . . . 3. Create new Objective-C file for bridging header file creation . . .

But what I had to do also is add all the missing header files to my umbrella header. And also make sure that these files are marked public. In Xcode you can add them to the public section under Build Phases -> Header.

like image 94
RiceAndBytes Avatar answered Sep 22 '22 18:09

RiceAndBytes