I have project using Swift 3.2 and Objective-C compiling with Xcode Version 9.0 (9A235). It compiles fine in Swift 3.2. However, when I switch to Swift 4.0, the methods declared in Swift is no longer visible in Objective-C. The error is No visible @interface "UserAPI" declares the selector ...
You should add @objc before your function like this.
@objc func doSomething() {
//Some code goes here
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With