I’ve searched around including the iOS SDK Compatibility Guide but cannot get an explanation of this.
I understand that:
- Deployment target is the earliest OS
version an App can run on - Base SDK is the SDK it will be
compiled using and whose features
can be used if the run time device
supports them
What I’m struggling with is how __IPHONE_OS_VERSION_MIN_REQUIRED can be used when this is fixed at compile time and the device’s OS is only known at run time. So the code that I submit will always compile the same.
Or are multiple versions compiled automatically?
Can someone please explain?
Many thanks,
Chris.
The IPHONE_OS_VERSION_MIN_REQUIRED is a define – so whilst your deployment target may be low, you may be using some important deprecated functions if your app is to be heavily compatible with a number of iOS versions.
You are – of course – correct in saying that the device’s OS is only known at run time. Depending on your project settings, Apple will use that information on the app store to ensure that users with the correct device can access your software. Multiple versions are not created to my knowledge – the code that you submit will appear to be dynamic if you use that define to make the most of working with older iOS versions.
You may also find this useful:
How to target a specific iPhone version?