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
  • 314,917
  • 42
  • 532
  • 579
ShedSports
  • 541
  • 2
  • 7
  • 14

0 Answers0