I am trying to access a swift class from an Objective-C file. I have done all the generic things needed to access the swift file from Objective-C such as #import "target-Swift.h"
so I can access Swift methods through a shared instance. So the issue is not hooking up Swift with Objective-C. My question is specifically the syntax to access the Swift class on its own.
The swift class is in a Utilities.swift file and it currently looks like:
@objc public class Metadata : NSObject {
var pum: String = ""
var pmm: String = ""
var id: NSInteger = 0
}
I am trying to use it in an objective-C method with
Metadata * m = [Metadata new];
The class itself compiles but when I try to call it as above, compiler is giving error: 'Use of Undeclared identifier 'Metadata'
What is the correct syntax to gain access to this class?