0

how do I include a single -swift.h in a file shared by multiple targets in xcode?

I want to include "PROJECTNAME-Swift.h" once rather than have a sea of

#if SOMETHING_SPECIFIC_FOR_TARGET_1
#import "Target1-Swift.h"
#elsif SOMETHING_SPECIFIC_FOR_TARGET_2
#import "Target2-Swift.h"
...
Anton Tropashko
  • 5,486
  • 5
  • 41
  • 66

1 Answers1

1

This Objective C to Swift header file with multiple targets

helped.

once you will have added custom user defined setting SWIFT_MODULE_NAME as Foo for each and every target you can swiftly import Foo-Swift.h instead of a gazillion of target specific TargetX-Swift.h

Anton Tropashko
  • 5,486
  • 5
  • 41
  • 66