Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the meaning of Base SDK, iOS deployment target, Target, and Project in xcode

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?

like image 330
user4951 Avatar asked Sep 02 '13 08:09

user4951


People also ask

What is iOS deployment target in Xcode?

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.

What does target mean in Xcode?

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.

What iOS deployment target should I choose?

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.

Where is project target in Xcode?

Add a New Target to Your Project Choose File > New > Target. Select the platform for the new target. Choose a starting template.


3 Answers

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

like image 124
onmyway133 Avatar answered Oct 18 '22 05:10

onmyway133


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.

like image 35
trojanfoe Avatar answered Oct 18 '22 05:10

trojanfoe


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

like image 36
V1ru8 Avatar answered Oct 18 '22 05:10

V1ru8