Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 10, 11 - failed to emit precompiled header

I have taken a project from another laptop to mine. In the other mac it works without any issues but in mine, I am getting this issue -

failed to emit precompiled header '/Users/appinventiv-adi/Library/Developer/Xcode/DerivedData/Virdrobe-ahwxulrvqoovkyfbnbtarxxnsjsa/Build/Intermediates.noindex/PrecompiledHeaders/Virdrobe-Bridging-Header-swift_HAGCLKDLI8AG-clang_3Q648AEBG43LR.pch' for bridging header '/Users/appinventiv-adi/Downloads/Vardrobe/Virdrobe/Application/Virdrobe-Bridging-Header.h'

I have already tried all solutions mentions here - Xcode 9 - failed to emit precompiled header and Failed to emit precompiled header for bridging header but nothing is working.

like image 582
Aditya Ahuja Avatar asked Sep 01 '25 20:09

Aditya Ahuja


2 Answers

This is b'coz on other machine the the search path is set something like /Users/appinventiv-adi/Downloads/Vardrobe/Virdrobe/Application/Virdrobe-Bridging-Header.h and that file is not available in your machine on that path.

What you need to do is change the search path form build setting of your project so it will work without any issue.

NOTE: Instead of static path you can set dynamic path using $(SRCROOT) or $(PROJECT_NAME) as required.

like image 124
Mahendra Avatar answered Sep 03 '25 16:09

Mahendra


The solution to my problem was that the 3rd party library of GPUImage was used by external library linking and bridging-header. I removed the library and installed it via cocoapod.

like image 41
Aditya Ahuja Avatar answered Sep 03 '25 17:09

Aditya Ahuja