'NSEvent' may not respond to '+modifierFlags'

I get these warnings when compiling a project, fwiw:

modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm:962: warning: 'NSEvent' may not respond to '+modifierFlags' modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm:962: warning: (Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.)

This is in ModifierKeys::getCurrentModifiersRealtime().

Yes, but If you look at the code, you’ll see that it checks whether the selector is available before calling it, so it’s quite safe. And you’ll only get the warning if you’re compiling with an older SDK anyway.

Yes, I realize it will check. I just wonder why it shows the warning for this when it doesn’t for other calls.

Why does it only happen with an older sdk?

Because they only added the API call in a more recent SDK.

Ok, good to know.