Tell Xcode to ignore a header for some targets?
- by William Jockusch
I have an Xcode project with a mac target and an iOS target. The project contains a class IPhoneOnlyClass which is used in the iOS target only. I have unchecked IPhoneOnlyClass.m from the mac target so it doesn't compile that file.
Now IphoneOnlyClass.h contains the line
#import <GameKit/GameKit.h>
When I am compiling for the mac target, Xcode gives me an error:
error: GameKit/GameKit.h: No such file or directory
I could get around this with a #ifdef, but is there a better way? I'd rather tell Xcode to ignore the header altogether when compiling the mac target.