Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to emit precompiled header for bridging header

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: enter image description here It can't solve it.

How to make it?

like image 706
Ringo Avatar asked Aug 20 '17 07:08

Ringo


People also ask

How do you make a bridging header in Swift?

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.

What is the purpose of precompiled header?

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.


1 Answers

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.

Scr1

scr2

like image 200
Paras Gupta Avatar answered Oct 04 '22 01:10

Paras Gupta