Reputation: 69
I just cloned a github code. When i tried to run it , it gave me no bridging header available isse, which i resolved by changing the folder name in "Build settings" . After that when i tried to build i am getting this issue as
"<unknown>:0: error: PCH file '/Users/iosdeveloper/Library/Developer/Xcode/DerivedData/Project-ebqolwjodqhfifemlvpiqcmkwmtt/Build/Intermediates.noindex/PrecompiledHeaders/Project_1CZ4Z98EHTKKG-clang_1PO86BEGEY3JE.pch' not found: module file not found
<unknown>:0: error: clang importer creation failed
"
Please help me on this.
Upvotes: 5
Views: 7911
Reputation: 1646
In my case I've not included .h
extension at the end of App-Bridging-Header in Build Settings. After given App-Bridging-Header.h the error gone. Hope it will help to some one.
Upvotes: 8
Reputation: 7854
I too had this issue today - I found that if I gave the path to my App-Bridging-Header.h
in the form of "${SRCROOT}/App/Some/Directory/App-Bridging-Header.h"
the error in question would occur, however by changing the bridging header path to simply App/Some/Directory/App-Bridging-Header.h
the PCH "module file not found" disappeared and I was able to compile my project.
I did not need to create a Prefix.pch
file at all
Hope this helps someone!
Upvotes: 1
Reputation: 100533
Use $(SRCROOT)/$(PROJECT_NAME) to setup a dynamic link as dragging the file to settings make a static path and that causes a problem when running the project in another path
go to
1- Build Settings > Search: "Prefix Header".
2- Under "Apple LLVM 7.0" you will get the Prefix Header key.
3- Type file directory. e.g: "$(SRCROOT)/$(PROJECT_NAME)/ProjectName-Prefix.pch".
Upvotes: 3