Post

Replies

Boosts

Views

Activity

Reply to Swift class in ObjC Project : "Receiver 'MySwift' for class message is a forward declaration" error even after adding @obj and open prefixes
I know, it's an old issue. But, to help other peoples I post my answer. To create an instance of a swift you need to inherit of NSObject. class MySwiftClass: NSObject { } Sometimes you need to add @objc component behind the class. @objc class MySwiftClass: NSObject { }
Topic: Programming Languages SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’22