What exactly does this mean? I’ve seen Availability: iOS (6.0 and later) and other version numbers, but I don’t think thats exactly what it means. Does it truly mean that its only available with iOS 6 and up? If thats the case, then why is the comparable method for iOS 2.0f and later depreciated? Shouldn’t I still be using it when the iOS version is less that 6.0 or the specified availability?
An example is NSTextAlignmentCenter. It specifies that it is Availability: iOS (6.0 and later), but I’m building an app for iOS 4.3 and up. I’m currently performing a check on the iOS version of the device and choosing the text alignment between NSTextAlignmentCenter and UITextAlignmentCenter. To me, this seems odd. Shouldn’t it be for iOS SDK 6.0 and later, rather than iOS 6.0 and later?
I know this seems like nitpicking, but it makes a pretty big difference.
Yes, it truly means only available in iOS 6 and later.
Most of the Apple-provided frameworks that you link into your app are dynamic — they’re not built into your app, but linked in when the app launches. They exist on the device as part of the operating system. That means that making retroactive changes such as adding a new method is somewhere between difficult and impossible. Important changes, such as security fixes, are typically made in minor OS updates. Feature changes to the API are usually reserved for more significant upgrades.
Some changes do happen retroactively. For example, object literals work not just in iOS 6 but also in 5 and (I think) even 4. That’s because in the case of object literals, the change is in the compiler, not in the operating system or frameworks. As long as you’re using a compiler that understands the object literal syntax, the object code that the compiler emits will be compatible with older systems.