How to get iOS 16 Hello World code showing in Xcode 16

Hello,

I have installed the latest Xcode (v 16.2). I would like to code for minimum iOS installation v 16. The default Hello World code in Xcode 16.2 has error messages because some of the code requires minimum target installation of iOS v 17.

Please can you tell me how to get the default Hello World code for minimum target iOS 16 to show in Xcode 16?

(I considered installing Xcode 14, but the minimum Xcode for deployment is v15)

Thank you for any help

What do you mean by "default Hello World code"?

When I create a new project using the default iOS App template, the minimum deployment target is iOS 18.2.

I can change that all the way back to iOS 15 and the app still works fine. I tried both Swift and SwiftUI templates.

In the past, I have seen Xcode's default templates be unusable on older deployment targets. Typical solutions are:

  1. Use an older project as a template
  2. Remove the offending code
  3. Install an older Xcode on an older computer or VM.

I created "Test Hello", a SwiftUI project in Xcode 16.2 (that's what you call Hello world project).

I set the minimum target to 15.6 as shown below:

I then tested successfully on iOS 16.0 simulator.

How to get iOS 16 Hello World code showing in Xcode 16
 
 
Q