Xcode 10 Failed to emit precompiled header for bridging header

Jaqueline picture Jaqueline · Sep 23, 2018 · Viewed 9.9k times · Source

Hi I'm getting a very annoying error on Xcode 10 that is

1 error generated. <unknown>:0: error: failed to emit precompiled header '/Users/me/Library/Developer/Xcode/DerivedData/APP-hlczpckeselwrtaqjcbxdpoiogkj/Build/Intermediates.noindex/PrecompiledHeaders/APP-Bridging-Header-swift_35K3KO8G70VCD-clang_3DGF15CYP79L0.pch' for bridging header '/Users/me/Desktop/Swift/Folder/APP/APP/UNLKV2-Bridging-Header.h'

I'm not sure how to solve this I have tried everything. It was very sudden today before there was no problem but the second I added the Firebase info.plist to the project I got this error. I have tried to delete the file, made sure the name of the header file was entered correctly in the "Objective-C Bridging Header" and I have it entered as
$(PROJECT_DIR)/$(PROJECT_NAME)/$(PROJECT_NAME)-Bridging-Header.h
I have cleaned and built the project multiple times and reinstalled all the pods.

Besides this, I also get an error that

JPSVolumeButtonHandler/JPSVolumeButtonHandler.h' file not found

I would really appreciate it if someone could help me solve this, I've been looking around all day at every single post and forum and nothing has worked for me. If you need any more information about this issue, please let me know.

Answer

Oleg Poliukhovych picture Oleg Poliukhovych · Nov 13, 2018

Had same issue that I've tried to fix for hours. Ended up with this solution:

  1. select scheme, from appeared menu choose Manage Schemes...
  2. from popped up list of schemes find [Your Project Name] scheme, select it and delete by pressing - button in the bottom left corner of list
  3. Press Autocreate Schemes Now button in the top right corner

See screenshots below:

enter image description here

enter image description here