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
@available(iOS 11.0, *)
func myFunction() {
// function defination
}
if #available(iOS 11.0, *) {
// iOS 11 specific stuff here
} else if #available(iOS 10.0, *) {
// iOS 10 specific stuff here
} else {
// non iOS 11 & 10 stuff here
}