Check for iOS version
If you need to check if a certain method exists you can also check if the object supports it via respondsToSelector: like this:

if ([object respondsToSelector:@selector(openURL:options:completionHandler:)]) {
    [object openURL:...options:...completionHandler:...];
} else {
    [object openURL:...];
}


I think this approach is more flexible than checking the OS version. I've seen many people doing this.

This is similar to how JavaScript programmers check existence of certain JS features: if they checked the browser version instead, the code would be unmaintainable as there are a lot of browsers and they constantly evolve.