I want to use Xcode 9 to add iOS 11 code to my project while keeping the option to compile the project with Xcode 8 which only supports iOS 10.
In Objective-C I can do t
The iOS 11 SDK comes with Swift 3.2 (or Swift 4), so you can use a Swift version check to accomplish the same thing:
#if swift(>=3.2) if #available(iOS 11.0, *) { … } #endif