App Delegate Life Cycle In Ios

In ios 12 and earlier the system uses your app delegate.
App delegate life cycle in ios. Uiapplicationdelegate is a protocol that your app has to implement. Before ios version 13 the appdelegate class manages all the ios app s life cycle methods that includes process lifecycle and ui lifecycle methods like below picture. เม อเราสร างโปรเจคใหม เราจะพบก บไฟล appdelegate เสมอ เพราะม นม หน าท ในการควบค มการทำงานของ application ต าง ๆ ไม ว าจะเป นการด กจ บสถานะของ application ว า.
Now xcode 12 introduces two options for app life cycle. Application lifecycle helps to understand overall app behaviour. Once the object is created and initialized then the appdelegate swift is turn on and the uiapplication object will pointed to appdelegate swift file.
In ios 12 and earlier use the uiapplication delegate object to respond to life cycle events. Respond to scene based life cycle events. After the user taps your app icon springboard the part of the os that operates the home screen of ios launches your app.
Specifically you use methods of the app delegate to update the state of your app when it enters the foreground or moves to the background. As a result the app state transitions affect your app s entire ui including content on external displays. The app delegate manages all of your app s windows including those displayed on separate screens.
If you enable scene support in your app ios always uses your scene delegates in ios 13 and later. Your app and the shared libraries it needs to execute will be loaded into the memory while springboard animates your app s launch screen. Life cycle management in ios 12 and earlier in ios 12 and earlier you use your app delegate to manage major life cycle events in your app.
Contentview swift is the first view file which renders. A scene represents one instance of your app s ui running on a device. The typical life cycle of ios application starts with uiapplicationmain when we run the app first its object will create and initialized.