To reach as many users as possible you have to check whether something exists before you try to use it. Customizing code based on iOS version number is possible, but there are other ways to do it.
Check whether some class is available, might need this with object factory and class specific protocol:
NSString *someClass = @"MyClass";Check whether class supports a method:
Class class = NSClassFromString(someClass);
if ([class conformsToProtocol:@protocol(SomeProtocol)])
id instance = [[class alloc] init];
if ([item respondsToSelector:@selector(newMethod:)])Check whether some keyword is available:
[self workAroundFor:item with:value];
if (&UINewKey != nil)Welcome to the iReal iFragmented iWorld, iOS!
NSDictionary *dict = [info objectForKey:UINewKey];
NSDictionary *dict = [self generateDictInfo];