So I'm trying to use an @objc swift class as a property on my objective-c header file.
example
@objc class SwiftClass: NSObject {
}
@interface ObjcObject : NSObject
#pragma mark - Public Properties -
@property (nonatomic, weak) SwiftClass* swiftClass;
However if I #import ProjectName-Swift.h
it gives me the error that "'ProjectName-Swift.h'file not found'
I found an answer here that implies you can't actually import Swift into a header file https://stackoverflow.com/a/29951314/3877767
How then am I supposed to use swift code together with objc code? I would not call swift and objc interoperable if you can't use @objc marked swift classes as properties on and objc header file
So inside of my App-Bridging-Header.h
#import "ObjcClass.h"
and inside of my ObjcClass.h
#import "ProjectName-Swift.h"
This gives the error ProjectName-Swift.h can't find file
Either removing the #import ProjectName-Swift.h
, or the #import ObjcClass.h
fixes the problem, but then I can't use the Swift/OBJC code respectively