How do I remove a bridge header without getting er

2020-06-07 01:53发布

I added a bridge header to my app the other day because I was trying to add Objective-C files to my Swift project. I was having trouble getting the connection to work(and I also did not know how to implement the Objective-C files), so I decided I wanted to start over again. I deleted the Objective-C files and the Bridge-Header file and now I am getting an error saying:
<unknown>:0: error: bridging header '/Users/CalebKleveter/Documents/Development/iOS/personal/swift/Projects/Dicey/Dicey/Dicey-Bridging-Header.h' does not exist

Xcode Bridge-Header error File tree for an Xcode project

3条回答
叼着烟拽天下
2楼-- · 2020-06-07 02:16

enter image description hereGo to targets file->Build Settings->Swift Compiler - General, delete the contents in the same line as Objective-C Bridging Header

查看更多
狗以群分
3楼-- · 2020-06-07 02:21

Deleting the lines containing SWIFT_OBJC_BRIDGING_HEADER in MyProjectName.xcodeproj/project.pbxproj did the trick for me.

I could not find the Build Settings in my Xcode project as other answers mentioned (maybe because my project is for MacOS, not iOS?).

查看更多
狗以群分
4楼-- · 2020-06-07 02:29

Go to Build Settings of your project, find Objective-C Bridging Header row and remove its contents.

enter image description here

查看更多
登录 后发表回答