I'm successfully calling my Swift classes from Objective C (for target 'MyApp') via the import statement:
#import "MyApp-Swift.h"
I've now created a new target called "MyAppLite"
When I compile the new target, I get errors because "MyApp-Swift.h" is required by the code, but the compiler is creating "MyAppLite-Swift.h"
So, I need to create a conditional Swift/ObjC header #import
for the target I'm compiling against.
How can this be done, or is there a better way?
See Question&Answers more detail:os