Reputation: 99
I just created a framework in swift, and its working fine in swift project but in objective c I am getting errors like Undefined symbols for architecture armv7:
. I just checked the available architectures using lipo -info
, its showing both simulator and device architectures. Also I referred this link but no use.
Attached image also.
I'll appreciate any help, Thank you.
Upvotes: 0
Views: 309
Reputation: 3291
Here below is to do list in your Framework.
Swift classes usage in Objective C classes
I followed Apple Mix and Match approach. Hope this will help. Thanks
Upvotes: 1
Reputation: 4570
To access a swift class in objc, that is not inherited from NSObject you need to:
@objc public class yourUtils
A Swift class or protocol must be marked with the @objc attribute to be accessible and usable in Objective-C. This attribute tells the compiler that this piece of Swift code can be accessed from Objective-C. If your Swift class is a descendant of an Objective-C class, the compiler automatically adds the @objc attribute for you.
Upvotes: 0