I have a concern with my .pch file in Xcode 5.
I have following code in my .pch file--
#ifdef __OBJC__
#import <Example/Example.h>
#endif
But when i use Example.h class in my code it is not working. When i use code like-
[Example sharedInstance];
xcode shows error "Use od undeclared identifier Example". What is the problem?
This Screen Shot from XCode 6.1 shows how I got this to work - and therefore may prove helpful.
Look at the bold text, mid-way down, in the "Apple LLVM 6.0 - Language" TARGETS / Build Settings area.
Notice how the bold text "Precompile Prefix Header" has been set to YES, and the path to the pch file in "Prefix Header" is set with ProjectName/YourPCHFile-Prefix.pch
You will need to include the path to the headers in the "Header Search Path" build settings so that the preprocessor/compiler can find the headers.
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