I downloaded a project from GitHub, then pod the following files, some of which are written by OBJ-C and I used a bridge header.
pod ‘SnapKit’ pod ‘MJRefresh’ pod ‘Alamofire’ pod ‘Kingfisher’ pod ‘MBProgressHUD’ pod ‘pop’ pod ‘EVReflection’ pod ‘StreamingKit’ pod ‘iCarousel’ pod ‘ReflectionView’
When I run the project with Xcode 9.0 beta 2, but unfortunately the error log as follows :
error: failed to emit precompiled header '/var/folders/kd/4gh0_kxx3jx4thjb_sssmmcw0000gn/T/EvoRadio-Bridging-Header-97bd5f.pch' for bridging header '/Users/ringo/Downloads/EvoRadio-master/EvoRadio/Resources/EvoRadio-Bridging-Header.h'
I have googled, but no such issue.The error means it needs a PCH file? This is my .pch
header configuration: It can't solve it.
How to make it?
Alternatively, you can create a bridging header yourself by choosing File > New > File > [operating system] > Source > Header File. Edit the bridging header to expose your Objective-C code to your Swift code: In your Objective-C bridging header, import every Objective-C header you want to expose to Swift.
Precompiled headers (PCH) are a performance feature supported by some compilers to compile a stable body of code, and store the compiled state of the code in a binary file. During subsequent compilations, the compiler will load the stored state, and continue compiling the specified file.
I have tried all of the above steps mentioned in the answers but nothing worked for me, the problem was basically with the deployment target version for the project and in the podfile.
In my project deployment target was 10.0 while in my podfile it was 11.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With