skip to Main Content

So I’m new to Swift. I see it’s a fast-moving language.

But so many tutorials I see have AppDelegate and SceneDelegate as standard init files, why don’t I have any? Why can’t I seem to find an option for them?

The tutorials include one from July 2020 so I’m guessing this is some sort of recent update. How should I approach the two types of apps with different file types? As a "Veteran" programmer, which is more advantageous?

Thanks everyone. Happy Coding.

2

Answers


  1. The only way I know to get the result you did is to choose "SwiftUI" for Interface and "SwiftUI App" for Life Cycle in the New Project dialog. If you choose "Storyboard" for Interface, or "UIKit App Delegate" for Life Cycle, you will get the files you expected.

    enter image description here

    Login or Signup to reply.
  2. When creating a new iOS app, if you select SwiftUI App for the life cycle, this replaces the use of AppDelegate and SceneDelegate.

    If you want a classic lifecycle delegate, you can select UIKit App Delegate instead.

    Creating a Swift UI App

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search