xcode 如何删除桥头而不会出错?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32274684/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I remove a bridge header without getting errors?
提问by Caleb Kleveter
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
前几天我在我的应用程序中添加了一个桥头文件,因为我试图将 Objective-C 文件添加到我的 Swift 项目中。我在连接工作时遇到了麻烦(而且我也不知道如何实现 Objective-C 文件),所以我决定重新开始。我删除了 Objective-C 文件和 Bridge-Header 文件,现在我收到一条错误消息:<unknown>:0: error: bridging header '/Users/CalebKleveter/Documents/Development/iOS/personal/swift/Projects/Dicey/Dicey/Dicey-Bridging-Header.h' does not exist
回答by egor.zhdan
回答by Team chang
回答by Logan
Deleting the lines containing SWIFT_OBJC_BRIDGING_HEADER
in MyProjectName.xcodeproj/project.pbxproj
did the trick for me.
删除包含SWIFT_OBJC_BRIDGING_HEADER
in的行MyProjectName.xcodeproj/project.pbxproj
对我来说很有效。
I could not find the Build Settings in my Xcode project as other answers mentioned (maybe because my project is for MacOS, not iOS?).
我无法在我的 Xcode 项目中找到构建设置,正如提到的其他答案(可能是因为我的项目适用于 MacOS,而不是 iOS?)。