As you know that AppDelegate.Swift class is that main starting or entry point of our application. As we tap the build button in xCode && all Swift source files are compiled && also if the main.swift file exists then this file will be set as the entry point of our application. In AppDelegate.Swift file a very special attribute named "@UIApplicationMain" exists whose task is just to synthesize the main method for the application && set the associated file as AppDelegate.Swift file. As you also know that UIResponder is the parent class of all the UI content of iOS, && our AppDelegate.Swift file inherits this class. The main function calls the UIApplicationMain method that reads the Info.plist file that isa existing in our Project Navigator. If in this file all the key value pair for launch screen && Main.storyboard exists then the application will start with the extra functionality that are present in the Info.plist file. Here is the file named as Info.plist :
As you can see the in this file all the entries are existing that are needed to start you application. Well don't just go on my words just go ahead && delete any entry && then try to run your application then you will find that those functionality are not working in your app. For example if you deleted an entry named "Launch screen interface file base name" you will find that launch screen will not shown by the simulator. And the function in your AppDelegate.Swift file that reads this file is the function named :---> " application:didFinisdhLaunchingWithOptions()".
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
............
............
}
Here in this bit of code the function's option "launchOptions" is this main things to read the info.plist file for you. So this is how your application starts.