Reputation: 3653
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
Upvotes: 1
Views: 1199
Reputation: 1317
Make sure your build setting is selected as "All" and "Combined" look at below link
Swift Compiler - General is missing in Xcode 9.1
Upvotes: 2
Reputation: 14380
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.
Upvotes: 2