My app needs to be compatible with different OS versions.
How do I detect if a specific class is available to use with the particular OS?
As an example, NSPopover is only available in Lion and up, so how can I check if the OS supports NSPopover in case the person is using Snow Leopard?
You could do
or
https://developer.apple.com/documentation/foundation/1395135-nsclassfromstring