Swift provides a special preprocessor directive called os
to check what operating system you are running:
struct A {
#if os(iOS)
let a: AvailableOnIOS
#elseif os(tvOS)
let a: AvailableOnTVOS
#endif
}
I am interested if there is something similar in Objective-C that can be used like
@interface A: NSObject
#if os(iOS)
@property (nonatomic, strong) AvailableOnIOS* a;
#elseif os(tvOS)
@property (nonatomic, strong) AvailableOnTVOS* a;
#endif
@end