1

Does the -import-objc-header option of the Swift compiler define any macro that can be used to determine whether a header is being parsed by the Swift importer?

For example, given the following bridging header:

@interface FooClass

- (void)publicMethod;

#ifdef SWIFT
- (void)callableFromSwiftOnly;
#else
- (void)callableFromObjcOnly;
#endif

@end

Is there a 'SWIFT' or similar preprocessor token defined when the importer parses the header?

Jake Petroules
  • 23,472
  • 35
  • 144
  • 225

0 Answers0