johnno1962 / InjectionApp

Issue Tracking Repo for Injection as an App
MIT License
111 stars 7 forks source link

PCH file '/var/folders/_7/twhp3br50wx35pmhq04wy5fw0000gn/T/Nameproj-Bridging-Header-bf12e7.pch' not found #27

Open igortxito opened 7 years ago

igortxito commented 7 years ago

I tried everythig, delete derived data, recompile...but dont'k how to generate that pch file related to bridging that is asing...

johnno1962 commented 7 years ago

Where are you getting this error. Sounds like an Xocde problem really.

igortxito commented 7 years ago

I use code 8.3.2 and the app runs without problem. The error is printed in the console when I run "inject source". There is one archive written in Objecttive-C and de corresponding bridge file.

johnno1962 commented 7 years ago

Mixing Xcode versions can be problematic. Try clearing out ~/Library/Developer/Xcode/DerivedData for the project.

igortxito commented 7 years ago

The same. The problem is when there is bridging header file: Compiling /Users/.../repositorio/..../..../XXXXBaseViewController.swift

:0: error: unable to read PCH file /var/folders/_7/twhp3br50wx35pmhq04wy5fw0000gn/T/Projectname-Bridging-Header-00ca7f.pch: 'No such file or directory' :0: error: PCH file '/var/folders/_7/twhp3br50wx35pmhq04wy5fw0000gn/T/Projectname-Bridging-Header-00ca7f.pch' not found :0: error: clang importer creation failed
johnno1962 commented 7 years ago

Is this when you are building or injecting?

igortxito commented 7 years ago

I think the problem is the precompilation of headers option in Build Phases. I dont know why but unchecking it seems to solve the problem

johnno1962 commented 7 years ago

Sounds right. Precompiling bridging headers is new to Xcode 8.3

dxd214 commented 5 years ago

Hi @igortxito how to fix ?

dxd214 commented 5 years ago

Compiling /Users/mac/Desktop/gitlab/XX/../XXController+Config.m *** Re-compilation failed (/Users/mac/Library/Containers/com.johnholdsworth.InjectionIII/Data/command.sh) fatal error: malformed or corrupted AST file: 'could not find file '/Users/mac/Desktop/gitlab/XX/../Lib/iflyMSC.framework/Headers/iflyMSC.h' referenced by AST file '/Users/mac/Library/Developer/Xcode/DerivedData/KSStory-bfjfggguonewydfqktouoblpsknc/Build/Intermediates.noindex/PrecompiledHeaders/PrefixHeader-eicanprpgzqtaxdzfkwpdportxpi/PrefixHeader.pch.pch'' 1 error generated.


The problem is when there is bridging header file, how to fix?

@igortxito @johnno1962

johnno1962 commented 5 years ago

Problem is 'could not find file '/Users/mac/Desktop/gitlab/XX/../Lib/iflyMSC.framework/Headers/iflyMSC.h’ probably to do with case sensitivity in build i.e. A != a

dxd214 commented 5 years ago

I annotated the introduction of the bridging header file, it seems to solve the problem.But I don't want to do that,Is there another way? @johnno1962