How to write apps for iOS 12 in Xcode 11?

Solution 1:

The steps to getting to an iOS 12/13 app:

1) Change deployment target to iOS 12.

2) Replace the AppDelegate's methods with what they ought to have for iOS 12 development. Also add this:

   var window: UIWindow?

3) Remove SceneDelegate.

4) Remove Application Scene Manifest in your info.plist.

Originally answered here

Solution 2:

First of all, Make sure to not selecting SwiftUI as user interface in template picker (select storyboard instead). Because SwiftUI requires iOS 13 (You can have SwiftUI only for iOS 13 and above beside UIKit for below iOS 13 at the same time, but it has some more extra work to do):

Storyboard

Second of all, make sure to choose lower target dependency (like 12.4) in general tap of the project settings:

Target