Post

Replies

Boosts

Views

Activity

Reply to How can I use conditional code for a new OS version while building with the current SDK?
You can check for the 5.3 compiler if your goal is to continue using older versions of the SDK (and thus Xcode), but still add functionality that will get enabled When re-compiled with the newer SDK: #if compiler(>=5.3) if @available(macOS 10.16, *) {     // use some new API } #endif If you want dynamic checks though, NSClassFromString() is probably your best bet, especially when developing from an SDK that isn’t in the released version of Xcode 😔
Jul ’20