iOS - Can't access Swift Singleton from Objective-C
In your Swift Singleton class, add @objc
for the method testPrint()
like:
@objc func testPrint() {
print("Singleton worked")
}
Now, you access the method from Objective-C class:
[[MySingleton shared] testPrint];