when i run my aplication i get this error
Nick[66720:3658939] -[_SwiftValue function1]: unrecognized selector sent to instance
i tried moving out of the class and it says only protocol member can be there
import Cocoa
class mymainclass: NSObject, NSApplicationDelegate{
var mytimer = Timer.scheduledTimer(timeInterval: 0.2, target: self, selector: #selector(function1), userInfo: nil, repeats: true)
func applicationDockMenu(_ sender: NSApplication) -> NSMenu? {
return dockMenu
}
@objc func function1(){
print(“function1 test”)
}
}