Say I set base SDK to 7, what does it mean? It could mean that the app would run on iOS 7. But that's what iOS deployment target is for.
Also why do I specify those 3 values in both project and target. It doesn't make sense. Why specify the same thing twice?
In short, every application that runs on one of Apple's platforms has a deployment target. A deployment target is nothing more than the minimum version of the operating system the application can run on. Fire up Xcode and create a new project by choosing the App template from the iOS > Application section.
A target specifies a product to build and contains the instructions for building the product from a set of files in a project or workspace. A target defines a single product; it organizes the inputs into the build system—the source files and instructions for processing those source files—required to build that product.
You can set it based on your choice, if you would like to cover all the users using iOS devices then you can set deployment target to 10. x OR as per the latest analytical data from the Apple, there are only 7% devices using iOS 10. x or lower, so you can ignore them too and can set deployment target to 11.
Add a New Target to Your Project Choose File > New > Target. Select the platform for the new target. Choose a starting template.
In the iOS 7 TechTalk, session Architecting Modern Apps, Part 2, they explain this clearly
Good read Hi! I'm #available!
So, a modern App might use iOS 9 as the Target SDK, and iOS 7 as the deployment target. This means that you can run on iOS 7, iOS 8 and iOS 9, and that you have available to you any iOS 9 calls when actually running on iOS 9.
You can read more in my post SDK and Deployment Target
The base SDK is what you build your app against (i.e. include and library files and frameworks). As you say, it doesn't affect the deployment target, except that base sdk >= deployment target.
You specify build settings on 2 levels as each project can have multiple targets and you might not want the same settings for all targets. The project-level settings override the default settings and the target-level settings override the project-level settings.
For example I have projects with both OSX and iOS targets and some are ARC and some are MRR. I'd have to have different projects for each if I was unable to specify build settings with the level of granularity that Xcode allows.
Base SDK is the SDK you link against. Deployment Target is the minimum required iOS version you application needs to run. You can build an application with SDK 7 that runs under iOS 6. But then you have to take care to not use any function or method that is not available on iOS 6. If you do, your application will crash on iOS 6 as soon as this function is used.
See the apple documentation for more details: https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With