ios中的SWRevealViewController给出桥接头错误

Posted

技术标签:

【中文标题】ios中的SWRevealViewController给出桥接头错误【英文标题】:SWRevealViewController in ios giving bridging header error 【发布时间】:2017-02-13 06:18:57 【问题描述】:

我在 ios 中使用 SWRevealViewController 的项目之前运行良好,但是当我将其复制到新位置时,它显示revealviewcontroller 文件丢失错误。我删除了文件 .m 文件和 .h 文件。然后我再次添加了这两个文件并添加了头文件,但我仍然收到以下错误:

Showing Recent Issues
Bridging header '/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/ePunjabStaffLogin-Bridging-Header.h' does not exist


Showing Recent Issues
CompileSwift normal i386 /Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/HeaderTableViewCell.swift
    cd /Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/ViewGrievancesViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/LeaveChild.swift" -primary-file "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/HeaderTableViewCell.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/ChildGrievanceTableViewCell.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/HedaerCellTableViewCell.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/Promotions.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/PromotionsViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/MdmShowViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/ViewLeavesViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/PromotionsTableViewCell.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/Constants.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/MdmReportViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/LoginViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/ShowMdmRowTableViewCell.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/UpdateViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/StringExtension.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/SpecialLeaveViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/ChildTableViewCell.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/ViewAttendanceViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/MenuViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/promotionsHeadTableViewCell.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/MenuHomeViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/AppDelegate.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/Mdm.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/LoggedInViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/GrievanceChild.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/RoutineLeaveViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/PersonalProfileViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/DataDiscrepancyViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/PromotionsChild.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/HeadTableViewCell.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/HeadGrievanceTableViewCell.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/jobProfileViewController.swift" "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/ApplyGrievanceViewController.swift" -target i386-apple-ios10.1 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.1.sdk -I /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Products/Debug-iphonesimulator -F /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Products/Debug-iphonesimulator -F /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Products/Debug-iphonesimulator/Alamofire -F /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Products/Debug-iphonesimulator/MBProgressHUD -F /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Products/Debug-iphonesimulator/SwiftyJSON -F /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Products/Debug-iphonesimulator/Toast-Swift -enable-testing -g -import-objc-header "/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/ePunjabStaffLogin-Bridging-Header.h" -module-cache-path /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ModuleCache -D DEBUG -D COCOAPODS -serialize-debugging-options -Xcc -I/Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Intermediates/ePunjabStaffLogin.build/Debug-iphonesimulator/ePunjabStaffLogin.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Intermediates/ePunjabStaffLogin.build/Debug-iphonesimulator/ePunjabStaffLogin.build/ePunjabStaffLogin-generated-files.hmap -Xcc -I/Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Intermediates/ePunjabStaffLogin.build/Debug-iphonesimulator/ePunjabStaffLogin.build/ePunjabStaffLogin-own-target-headers.hmap -Xcc -I/Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Intermediates/ePunjabStaffLogin.build/Debug-iphonesimulator/ePunjabStaffLogin.build/ePunjabStaffLogin-all-target-headers.hmap -Xcc -iquote -Xcc /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Intermediates/ePunjabStaffLogin.build/Debug-iphonesimulator/ePunjabStaffLogin.build/ePunjabStaffLogin-project-headers.hmap -Xcc -I/Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Intermediates/ePunjabStaffLogin.build/Debug-iphonesimulator/ePunjabStaffLogin.build/DerivedSources/i386 -Xcc -I/Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Intermediates/ePunjabStaffLogin.build/Debug-iphonesimulator/ePunjabStaffLogin.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc "-working-directory/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin" -emit-module-doc-path /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Intermediates/ePunjabStaffLogin.build/Debug-iphonesimulator/ePunjabStaffLogin.build/Objects-normal/i386/HeaderTableViewCell~partial.swiftdoc -Onone -module-name ePunjabStaffLogin -emit-module-path /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Intermediates/ePunjabStaffLogin.build/Debug-iphonesimulator/ePunjabStaffLogin.build/Objects-normal/i386/HeaderTableViewCell~partial.swiftmodule -serialize-diagnostics-path /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Intermediates/ePunjabStaffLogin.build/Debug-iphonesimulator/ePunjabStaffLogin.build/Objects-normal/i386/HeaderTableViewCell.dia -emit-dependencies-path /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Intermediates/ePunjabStaffLogin.build/Debug-iphonesimulator/ePunjabStaffLogin.build/Objects-normal/i386/HeaderTableViewCell.d -emit-reference-dependencies-path /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Intermediates/ePunjabStaffLogin.build/Debug-iphonesimulator/ePunjabStaffLogin.build/Objects-normal/i386/HeaderTableViewCell.swiftdeps -o /Users/rajvirsingh/Library/Developer/Xcode/DerivedData/ePunjabStaffLogin-auseensntkpseucxkidususztofq/Build/Intermediates/ePunjabStaffLogin.build/Debug-iphonesimulator/ePunjabStaffLogin.build/Objects-normal/i386/HeaderTableViewCell.o

<unknown>:0: error: bridging header '/Users/rajvirsingh/Desktop/drive/ios projects/ios dec 2016/ePunjabStaffLogin/ePunjabStaffLogin/ePunjabStaffLogin-Bridging-Header.h' does not exist

【问题讨论】:

您的 ePunjabStaffLogin-Bridging-Header.h “缺少桥接头路径”。请检查并保留路径在构建设置中.. 在“Swift Compiler -Code Generation”-> Objective-C Bridging Header - “重置桥接头文件的路径” 如何重置路径yaar? “Swift Compiler -Code Generation”—> Objective-C Bridging Header add folderName/Bridging header file” 示例:- ePunjabStaffLogin/ePunjabStaffLogin-Bridging-Header.h 和文件应该在那个位置。 【参考方案1】:

您的 ePunjabStaffLogin-Bridging-Header.h “缺少桥接头路径”。请检查并保留路径在构建设置中.. 在“Swift Compiler -Code Generation”-> Objective-C Bridging Header - “reset the Path of Bridging header file”

【讨论】:

以上是关于ios中的SWRevealViewController给出桥接头错误的主要内容,如果未能解决你的问题,请参考以下文章

iOS开发:iOS中的多控制器管理

iOS开发:iOS中的多控制器管理

IOS5中的Safari不兼容Javascript中的Date问题

Java中的IO流

iOS6中的iOS行车路线

java中的IO 的示例