简体   繁体   中英

objective-c Bridging header not found in swift compiler-code generation

I am doing an ios app in swift 3. And I want to add ARKit which is available in objective-c . I dragged all objective-c files into my project then it asked to create bridging header. So I let it to create. And I imported all objective-c .h files inside that like this.

在此处输入图片说明

But when I try to build its showing 22 number of issues like UIView cannot identify etc..

Then I tried to add the bridging header path to build settings under swift compiler - code generation . But I dont see objective-c Bridging header section under that.

在此处输入图片说明

在此处输入图片说明

Please help me. What can I do to add these objective-c files into my swift 3 project successfully. Thanks

The Objective-C bridging header setting can be found under Swift Compiler - General under Build Settings .

But I like to add the bridging header by having Xcode generate it for me. I add a junk Objective-C class by File > New > File... and it will ask me if I want to add a bridging header to my project.

If you do that, you'll only need to move whatever you have in your bridging header now to that one and delete the header you have now. The header will be set properly in the project's settings.

Make sure your build setting is selected as " All " and " Combined " look at below link

Swift Compiler - General is missing in Xcode 9.1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM