84

Can anyone explain what is the life cycle process of iPhone? i.e from the start to end of the application life cycle.

2

4 Answers 4

125

See also This post on Cocoanetics that present a very useful flowchart explaining the different calls to the AppDelegate methods during the app life cycle:

UIApplication Delegate messaging flowchart

4
  • Is this still valid for ios5? Jun 19, 2012 at 7:23
  • @KronoS - Yes, the only time this changed significantly was the introduction of multitasking in iOS 4.0. It's still viable as of iOS 5.0 (and should continue to be so for iOS 6.0).
    – Brad Larson
    Jul 9, 2012 at 14:47
  • 1
    Apple/iOS does not send the applicationWillTerminate message. About all you will get is a SIGTRM when the operating system wants you out of memory. The docs have been broken for years.
    – jww
    Oct 10, 2013 at 15:17
  • iOS does send the applicationWillTerminale message, but only in the cases explained in the diagram, namely if you were compiling with SDK<4 (which can't be the case nowadays) or if you set UIApplicationExitsOnSuspend to YES in your app's Info.plist. So the diagram is still right ;) Oct 10, 2013 at 21:01
115

here is diagram image for understand Life Cycle (iPhone / Android)

enter image description here


Edit: Here is the more detailed information from Apple Docs.

Part 1:

enter image description here

Part 2:

enter image description here

Reference

Also this one is for View Controller Life Cycle methods

enter image description here

3
  • is there a diagram like this but using the applicationDid|Will methods?
    – Keale
    Sep 3, 2013 at 9:25
  • @Keale please check this official page have all the information with diagrams.
    – swiftBoy
    Nov 14, 2013 at 8:32
  • The Apple reference links are broken. Here are updated ones: The App Life Cycle and The Launch Cycle
    – RMP
    Oct 12, 2017 at 15:50
20

There's another simpler one in ios developer's cookbook

enter image description here

2

If you want to something more detail ,you can read the official document delivered by apple
It has been updated with iOS6.0
http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/ViewLoadingandUnloading/ViewLoadingandUnloading.html

1

Not the answer you're looking for? Browse other questions tagged or ask your own question.