175

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?

1

3 Answers 3

215

In the iOS 7 TechTalk, session Architecting Modern Apps, Part 2, they explain this clearly

enter image description here

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

12
  • 21
    Good reference.. and this part is buried at around 25:17 in this 50 min video.
    – Daniel
    May 3, 2014 at 4:45
  • 2
    Nice! But what happens if you set the Base SDK=7.0 and you try to install into iOS 8.0? Do we have to download the last XCode to support the latest Base SDK all the time?
    – GoRoS
    Sep 10, 2015 at 14:02
  • 2
    @chichilatte no, you don't need. The app still supports iOS 12, iOS 13, ... but it won't have any new features of iOS 12, iOS 13 .... To use new feature of iOS 12, you need to compile against iOS 12 SDK and use APIs from iOS 12.
    – onmyway133
    Feb 21, 2018 at 19:06
  • 3
    Thanks, that makes sense. I think @Kunal-Balani 's comment above is wrong. Feb 22, 2018 at 11:36
  • 2
    @Kunal-Balani, the other commenters are correct. You do not have to recompile your app if a newer version of the OS comes along than the one you built against unless they have removed support for what your app currently uses. A newer OS does not all of a sudden mean your app built against the older SDK stops working. If that was the case, no one would ever upgrade because it would mean every app they currently had would just stop working until newer versions came out which simply isn't true. Feb 13, 2019 at 20:37
86

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.

69

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.