.pch
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "thing.h"
#endif
I have a pretty large project I'm trying to debug and I have a suspicion the problem is in thing.h
From what I understand the .pch file is included in EVERY .m and .h in the project.
Is it possible to have it not included in just one or two files? For debugging I would like to not include thing.h in just one test file, but removing it from the .pch causes a cascading nightmare across the project.
This is a really old question but I just ran into this issue. I was able to solve the problem by wrapping the pch file with a ifndef SOME_NAME
. Then in the project settings on each specific file I wanted it to not be included I added a compiler flag of -DSOME_NAME=1
. Hope that helps someone in the future.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With