Screenshot of Xcode's project settings showing both the target and project iOS Deployment Targets.

I occasionally get hung up on stuff as I travel deeper into iOS development. I recently got confused with the difference between a project’s deployment target and a target’s deployment target. This is ultimately an issue of what iOS versions I will support as a developer, but I was confused about why I could specify it in two (or more) places.

As a web developer, I typically use something like caniuse.com to check a feature’s adoption and then work under the progressive enhancement philosophy to ensure the largest group of users have a good experience with the website I’m building. Importantly, I don’t have to be rigid with my intended support. People can use my website even if there’s a little jankyness. That’s not the case with iOS development. If I set a deployment target of iOS 16.0, folks with older devices or who haven’t updated their OS will be out of luck. No app for them.

The difference between your project and your target

There are two distinctions you need to be aware of:

  1. The settings under your project serve as defaults. They are overridden by any targets you have. Each target can have a different minimum iOS Deployment Target.
  2. The iOS Deployment Target at the project level doesn’t affect the targets you deploy, but it does specify what SDKs are available to you during development. You will get a compiler error if you attempt to use an SDK that supports a different iOS version than what you’re targeting.

Make sense?

Hopefully, that clears things up if you were like me and wondering why it looked like you had the same setting in multiple places. They’re both important to be aware of, but the target iOS Deployment Target is likely what you had in mind when you started down this rabbit hole.

Written by Matt Haliski

The First of His Name, Consumer of Tacos, Operator of Computers, Mower of Grass, Father of the Unsleeper, King of Bad Function Names, Feeder of AI Overlords.