I was just wondering if I have to write any code in my AppDelegate.swift
file in my Xcode project before releasing it. Is it necessary or will the app work just fine when I don't write anything in the AppDelegate
.
Do you have to? No, if you look at the UIApplicationDelegate
protocol you will see that none of the delegate methods are marked as required. It is a class provided as a convenience which lets you set up your application.
The Apple docs say it best:
Launch time is an important point in an app’s life cycle. At launch time, the app delegate is responsible for executing any custom code required to initialize your app. For example, the app delegate typically creates the app’s initial data structures, registers for any required services, and tweaks the app’s initial user interface based on any available data.