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?
You can try this solution. I have solved the same problem by this way.
Then make a clean and build again.
I also got exact same issue (Xcode9 beta 6) after I added cocoa pods for Encrypted Core Data.
This is my
PodFile
:Solution:
1 I added
$(inherited) non-recursive
toSearch Path -> Header Search Paths
2 Then added
${PODS_ROOT} recursive
toSearch Path -> User Header Search Paths
Both the above in my projects' target build settings.
Please have a look at these SO answers:
1 Inherit Header Search Paths
2 Inherit User Search Paths
My experience with this is that Xcode is unable to find header files for pods/frameworks imported in the project.
My Project experience with this: Updating Xcode9.2 - 9.3 where many cocoapods had to be updated due to implicit definitions now unavailable or being outdated.
I had changed the Podfile to now include 'use_frameworks!'. Following this and after dealing with other compile issues I found the error you are experiencing. I believe adding 'use_frameworks! was preventing some pods with support prior to iOS 8 from compiling correctly. Steps I took to correct this issue:
pod deintegrate
I then
pod install
again but the issue persisted.Ultimately I removed the use_frameworks line in Podfile and then repeated steps 1-3 and the project was now able to find the missing header files and the issue never presented it self again.
For my case I had a typo in folder name "Supporing FIles" instead of "Supporting Files".
In my case I had the same compiler error with additional errors like "Unknown type" in one of my project files, So I just added this to the problematic file, and it solved it instantly.
#import <UIKit/UIKit.h>
I had same scenario, make sure for the file A that you have included in YourProjectName-Bridging-Header.h