Is there a way to distinguish the active development device with a precompiler definition. I need to know when I’m on an Apple TV but I can’t use the UIKit-Framework.
Something like this:
#if TARGET_OS_IPHONE
NSLog(@"iPhone");
#else
NSLog(@"ATV");
#endif
iOS usually uses idioms to determine device types which is a runtime thing.
You can write your own targets for different builds between the two. Since there isn’t a default target for AppleTV since there isn’t an official SDK, you will probably have to roll your own.
One of the LLVM/Clang features that comes with XCode 4 is runtime checking for frameworks though. Not sure if UIKit is included on AppleTV but heavily modified or if it’s missing though.