I converted my (macOS) project to Swift 3 in Xcode 8 and I get the following warnings with several delegate methods I implement in swift classes:
Instance method 'someMethod' nearly matches optional requirement of protocol 'protocolName'
I get this for several NSApplicationDelegate methods like applicationDidFinishLaunching
and applicationDidBecomeActive
:
But also for implementations of tableViewSelectionDidChange
:
I used code completion to insert the method signatures and also tried copying them from the SDK-headers to rule out typos. The warnings just don't disappear and the methods are never called.
What am I missing here?
NSNotification
toNotification
for the first method, although yourtableViewSelectionDidChange
implementation compiles fine for me (warning free). Maybe try cleaning your build folder? – SyneNotification
had no effect (I adjusted the screenshot in the question accordingly). I also did a clean and deleted the Derived Data folder. – Alfilaria