0

I have a swift singleton file where I have a function to be called, but when I call it in my objective-c file I get the error.

class TestSimulator {

    static let testSim = TestSimulator()

    @objc func testPrint(){

        print("test print works")
    }

}

in objective c file

[[TestSimulator testSim] testPrint];

I import the TestSimulator file using

@class TestSimulator;
rmaddy
  • 307,833
  • 40
  • 508
  • 550
ShedSports
  • 303
  • 4
  • 11

0 Answers0