Frederic
Frederic

Reputation: 489

How to write apps for iOS 12 in Xcode 11?

I just installed Xcode on my new MacBook. The new starting templates for Swift iOS require iOS SDK 13+ (ie they either need UISceneDelegate or SwiftUI). Is there a way to create a new app using a built-in template that is compatible with iOS 12?

Upvotes: 9

Views: 5637

Answers (3)

BuffK
BuffK

Reputation: 1396

Another option is to use some simple template or example project.

https://github.com/PacktPublishing/The-10-Day-iPhone-App-Bootcamp---New-iOS-12-and-Xcode/tree/master/S01

You need to download that zip ,and open project file "Swift Fun.xcodeproj" with xCode 11

I use this to start and learn, this may help you.

Upvotes: 2

Rammohan Raja
Rammohan Raja

Reputation: 626

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

Upvotes: 13

Mojtaba Hosseini
Mojtaba Hosseini

Reputation: 119272

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

Upvotes: 4

Related Questions