TLDR Question
Why are my changes to Prefix Header
being ignored? How do I get my xcode project to acknowledge the Prefix Header
a.k.a GCC_PREFIX_HEADER
.
Context
I am trying to add a pch file to my framework for ios/osx. I have been following the instructions I've found in other S.O. posts(like this one), but haven't even been able even get the GCC_PREFIX_HEADER
/Prefix Header
field to give me a compilation error when I type an invalid address.
Steps
1. Select
NetworkFramework.xcodeproj
in XCode 8.3.2
- For each of:
- my project, called
NetworkFramework
; - my targets, called
NetworkFrameWorkMobile
andNetworkFrameworkMac
- my project, called
- Set:
Build Settings > Apple LLVM 8.1 - Language > Precompile Prefix Header
- To:
YES
- To:
Build Settings > Apple LLVM 8.1 - Language > Prefix Header
- To:
GIBBERISH
(I think this should be invalid input)
- To:
- For each of:
- Clean the build directory:
- ⌥⇧⌘k
- Build
- ⌘b
What I expect
Since I named the prefix header GIBBERISH
I expect there to be some sort of build error
What I get
A successful build, with no errors
Other things I have tried
- Closing and reopening XCode
- Deleting
/Users/topguncoder/Library/Developer/Xcode/DerivedData
+ restarting xcode + clean build
Reason for wanting a prefix header
I'm trying to get CocoaLumberJack
for this project.
They recommend having the following in the pch file:
#define LOG_LEVEL_DEF ddLogLevel
#import <CocoaLumberjack/CocoaLumberjack.h>