SlideShare a Scribd company logo
1 of 19
APPLICATION LIFECYCLE
Application lifecycles

 Applications and processes may transition
  between several states
   active
   paused
   stopped
   inactive
   suspended
 Callback methods allow applications to
  prepare for and respond to transitions
Android lifecycle methods

 Lifecycle state transitions trigger event
  callback methods
 Callback events differ based on type of
  component
 Callback methods take place in foreground
  and should be brief
Android Activity


                           Activity.                       Activity.
            Activity.                    Activity.                      Activity.   Activity.
                          onRestore                        onSave
            onStart                     onResume                        onPause     onStop
                        InstanceState                   InstanceState
Activity.                                                                                        Activity.
onCreate                                                                                        onDestroy




                                                          Activity.
                                                         onRestart




                                                     Active lifetime

                                                     Visible lifetime

                                                      Full lifetime
                                                                                        Application is
                                                                                        killable
Activity callback methods

 Implementation of lifecycle method should
  always first call superclass

         protected void onPause() {
             super.onPause();
             . . .
         }
Activity transition
     Activity A   Activity B

     ActivityA.
     onPause
                  ActivityB.
                  onCreate

                  ActivityB.
                   onStart

                  ActivityB.
                  onResume
     ActivityA.
      onStop
Android Service

Service.       Service.                               Service.
onCreate   onStartCommand                            onDestroy




                  Service.                Service.
                  onBind                 onUnbind



                              Service.
                             onRebind
Service binding methods
        Activity           Service


      bindService()

                           .onBind()
   ServiceConnection.
   onServiceConnected



     unbindService()

                          .onUnbind()
    ServiceConnection.
  onServiceDisconnected
Android BroadcastReceiver


                BroadcastReceiver.
                    onReceive




 Only active while handling onReceive()
  method
Android ContentProvider

                  ContentProvider.
                     onCreate



 Only active while handling methods
  supporting ContentResolver
     query()
     insert()
     update()
     delete()
     getType()
Processes and lifecycles

 Old processes removed when memory runs
  low
 Selection base on importance hierarchy
  1.   Foreground process
  2.   Visible process
  3.   Service process
  4.   Background process
  5.   Empty process
iOS Application lifecycle

 UIApplication notified of state transition
  events
   Handled by application delegate
     application:didFinishLaunchingWithOptions:
     applicationDidBecomeActive:
     applicationWillResignActive:
     applicationDidEnterBackground:
     applicationWillEnterForeground:
     applicationWillTerminate:
Pre – iOS 4

      application:didFinishLaunchingWithOptions:



             applicationDidBecomeActive:



                        Active



              applicationWillTerminate:
iOS Application launch
iOS Transition to background
iOS Return to foreground
iOS Interruption handling
          UIKit                      Delegate


         Active



 Phone, SMS, or Calendar
                            applicationWillResignActive:
   notification arrives


         Ignore     Yes     applicationDidBecomeActive:
            ?
        No
  Application moves to
                           applicationDidEnterBackground:
      background
iOS 4 Application lifecycle
      application:didFinishLaunchingWithOptions:



             applicationDidBecomeActive:


  Ignore
interrupt               Active              applicationWillEnterForeground:



             applicationWillResignActive:



            applicationDidEnterBackground:
                                                         Suspended


               applicationWillTerminate:
Reminder

 Proposal due Wednesday

More Related Content

What's hot

What's hot (20)

Introduction to Swift programming language.
Introduction to Swift programming language.Introduction to Swift programming language.
Introduction to Swift programming language.
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
 
iOS Coding Best Practices
iOS Coding Best PracticesiOS Coding Best Practices
iOS Coding Best Practices
 
Java arrays
Java    arraysJava    arrays
Java arrays
 
Android Service Intro
Android Service IntroAndroid Service Intro
Android Service Intro
 
MVVM with SwiftUI and Combine
MVVM with SwiftUI and CombineMVVM with SwiftUI and Combine
MVVM with SwiftUI and Combine
 
Adrotator in asp
Adrotator in aspAdrotator in asp
Adrotator in asp
 
Introduction to Kotlin - Android KTX
Introduction to Kotlin - Android KTXIntroduction to Kotlin - Android KTX
Introduction to Kotlin - Android KTX
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django Introduction
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
What's new in Visual Studio 2022
What's new in Visual Studio 2022What's new in Visual Studio 2022
What's new in Visual Studio 2022
 
Intro to Java
Intro to JavaIntro to Java
Intro to Java
 
Workshop Swift
Workshop Swift Workshop Swift
Workshop Swift
 
Introduction to java netbeans
Introduction to java netbeansIntroduction to java netbeans
Introduction to java netbeans
 
Callback Function
Callback FunctionCallback Function
Callback Function
 
Android Services
Android ServicesAndroid Services
Android Services
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Angular material
Angular materialAngular material
Angular material
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Android life cycle
Android life cycleAndroid life cycle
Android life cycle
 

Viewers also liked

Android Application Development at JFokus 2011
Android Application Development at JFokus 2011Android Application Development at JFokus 2011
Android Application Development at JFokus 2011Anders Göransson
 
Nokia product life cycle
Nokia product life cycleNokia product life cycle
Nokia product life cycleTasheen Sheikh
 
1. maggi the-product-life-cycle
1. maggi the-product-life-cycle1. maggi the-product-life-cycle
1. maggi the-product-life-cycleSwati Sharma
 
Product life cycle & marketing strategies
Product life cycle & marketing strategiesProduct life cycle & marketing strategies
Product life cycle & marketing strategiesAmar Ingale
 
Product life cycle of nokia mobiles
Product life cycle of nokia mobilesProduct life cycle of nokia mobiles
Product life cycle of nokia mobilesTanmoy Roy
 
Product Life Cycle Management
Product Life Cycle ManagementProduct Life Cycle Management
Product Life Cycle ManagementAnand Subramaniam
 
Product life cycle & marketing strategy
Product life cycle & marketing strategyProduct life cycle & marketing strategy
Product life cycle & marketing strategyHitesh Sunny
 

Viewers also liked (10)

Android Application Development at JFokus 2011
Android Application Development at JFokus 2011Android Application Development at JFokus 2011
Android Application Development at JFokus 2011
 
Perception Ppt New
Perception Ppt NewPerception Ppt New
Perception Ppt New
 
Nokia product life cycle
Nokia product life cycleNokia product life cycle
Nokia product life cycle
 
1. maggi the-product-life-cycle
1. maggi the-product-life-cycle1. maggi the-product-life-cycle
1. maggi the-product-life-cycle
 
Product life cycle & marketing strategies
Product life cycle & marketing strategiesProduct life cycle & marketing strategies
Product life cycle & marketing strategies
 
Product life cycle
Product life cycleProduct life cycle
Product life cycle
 
Product life cycle of nokia mobiles
Product life cycle of nokia mobilesProduct life cycle of nokia mobiles
Product life cycle of nokia mobiles
 
Product Life Cycle Management
Product Life Cycle ManagementProduct Life Cycle Management
Product Life Cycle Management
 
Product life cycle & marketing strategy
Product life cycle & marketing strategyProduct life cycle & marketing strategy
Product life cycle & marketing strategy
 
Product life cycle
Product life cycleProduct life cycle
Product life cycle
 

Similar to iOS Application Lifecycle

Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Gabor Varadi
 
App anatomy and life cycle
App anatomy and life cycleApp anatomy and life cycle
App anatomy and life cycleSV.CO
 
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptxMugiiiReee
 
Introduction to Handoff
Introduction to HandoffIntroduction to Handoff
Introduction to HandoffHarit Kothari
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1Hussain Behestee
 
Skinning Android for Embedded Applications
Skinning Android for Embedded ApplicationsSkinning Android for Embedded Applications
Skinning Android for Embedded ApplicationsVIA Embedded
 
Android Component.pptx
Android Component.pptxAndroid Component.pptx
Android Component.pptxQwerty140857
 
Android Training (Services)
Android Training (Services)Android Training (Services)
Android Training (Services)Khaled Anaqwa
 
Mad textbook 63-116
Mad textbook 63-116Mad textbook 63-116
Mad textbook 63-116PrathishGM
 
Presentation on Android application life cycle and saved instancestate
Presentation on Android application life cycle and saved instancestatePresentation on Android application life cycle and saved instancestate
Presentation on Android application life cycle and saved instancestateOsahon Gino Ediagbonya
 
Android development Training Programme Day 2
Android development Training Programme Day 2Android development Training Programme Day 2
Android development Training Programme Day 2DHIRAJ PRAVIN
 
Delegateless Coordinators - take 2
Delegateless Coordinators - take 2Delegateless Coordinators - take 2
Delegateless Coordinators - take 2Tales Andrade
 
Advanced android app lifecycle + Patterns
Advanced android app lifecycle + PatternsAdvanced android app lifecycle + Patterns
Advanced android app lifecycle + Patternsbryan costanich
 
Marakana android-java developers
Marakana android-java developersMarakana android-java developers
Marakana android-java developersMarko Gargenta
 
Hieu Xamarin iOS9, Android M 3-11-2015
Hieu Xamarin iOS9, Android M  3-11-2015Hieu Xamarin iOS9, Android M  3-11-2015
Hieu Xamarin iOS9, Android M 3-11-2015Nguyen Hieu
 

Similar to iOS Application Lifecycle (20)

Introduction toandroid
Introduction toandroidIntroduction toandroid
Introduction toandroid
 
Android101
Android101Android101
Android101
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Efficient Android Threading
Efficient Android ThreadingEfficient Android Threading
Efficient Android Threading
 
Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)
 
App anatomy and life cycle
App anatomy and life cycleApp anatomy and life cycle
App anatomy and life cycle
 
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
 
Introduction to Handoff
Introduction to HandoffIntroduction to Handoff
Introduction to Handoff
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1
 
Skinning Android for Embedded Applications
Skinning Android for Embedded ApplicationsSkinning Android for Embedded Applications
Skinning Android for Embedded Applications
 
Android Component.pptx
Android Component.pptxAndroid Component.pptx
Android Component.pptx
 
Android
AndroidAndroid
Android
 
Android Training (Services)
Android Training (Services)Android Training (Services)
Android Training (Services)
 
Mad textbook 63-116
Mad textbook 63-116Mad textbook 63-116
Mad textbook 63-116
 
Presentation on Android application life cycle and saved instancestate
Presentation on Android application life cycle and saved instancestatePresentation on Android application life cycle and saved instancestate
Presentation on Android application life cycle and saved instancestate
 
Android development Training Programme Day 2
Android development Training Programme Day 2Android development Training Programme Day 2
Android development Training Programme Day 2
 
Delegateless Coordinators - take 2
Delegateless Coordinators - take 2Delegateless Coordinators - take 2
Delegateless Coordinators - take 2
 
Advanced android app lifecycle + Patterns
Advanced android app lifecycle + PatternsAdvanced android app lifecycle + Patterns
Advanced android app lifecycle + Patterns
 
Marakana android-java developers
Marakana android-java developersMarakana android-java developers
Marakana android-java developers
 
Hieu Xamarin iOS9, Android M 3-11-2015
Hieu Xamarin iOS9, Android M  3-11-2015Hieu Xamarin iOS9, Android M  3-11-2015
Hieu Xamarin iOS9, Android M 3-11-2015
 

Recently uploaded

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Recently uploaded (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

iOS Application Lifecycle

  • 2. Application lifecycles  Applications and processes may transition between several states  active  paused  stopped  inactive  suspended  Callback methods allow applications to prepare for and respond to transitions
  • 3. Android lifecycle methods  Lifecycle state transitions trigger event callback methods  Callback events differ based on type of component  Callback methods take place in foreground and should be brief
  • 4. Android Activity Activity. Activity. Activity. Activity. Activity. Activity. onRestore onSave onStart onResume onPause onStop InstanceState InstanceState Activity. Activity. onCreate onDestroy Activity. onRestart Active lifetime Visible lifetime Full lifetime Application is killable
  • 5. Activity callback methods  Implementation of lifecycle method should always first call superclass protected void onPause() { super.onPause(); . . . }
  • 6. Activity transition Activity A Activity B ActivityA. onPause ActivityB. onCreate ActivityB. onStart ActivityB. onResume ActivityA. onStop
  • 7. Android Service Service. Service. Service. onCreate onStartCommand onDestroy Service. Service. onBind onUnbind Service. onRebind
  • 8. Service binding methods Activity Service bindService() .onBind() ServiceConnection. onServiceConnected unbindService() .onUnbind() ServiceConnection. onServiceDisconnected
  • 9. Android BroadcastReceiver BroadcastReceiver. onReceive  Only active while handling onReceive() method
  • 10. Android ContentProvider ContentProvider. onCreate  Only active while handling methods supporting ContentResolver  query()  insert()  update()  delete()  getType()
  • 11. Processes and lifecycles  Old processes removed when memory runs low  Selection base on importance hierarchy 1. Foreground process 2. Visible process 3. Service process 4. Background process 5. Empty process
  • 12. iOS Application lifecycle  UIApplication notified of state transition events  Handled by application delegate  application:didFinishLaunchingWithOptions:  applicationDidBecomeActive:  applicationWillResignActive:  applicationDidEnterBackground:  applicationWillEnterForeground:  applicationWillTerminate:
  • 13. Pre – iOS 4 application:didFinishLaunchingWithOptions: applicationDidBecomeActive: Active applicationWillTerminate:
  • 15. iOS Transition to background
  • 16. iOS Return to foreground
  • 17. iOS Interruption handling UIKit Delegate Active Phone, SMS, or Calendar applicationWillResignActive: notification arrives Ignore Yes applicationDidBecomeActive: ? No Application moves to applicationDidEnterBackground: background
  • 18. iOS 4 Application lifecycle application:didFinishLaunchingWithOptions: applicationDidBecomeActive: Ignore interrupt Active applicationWillEnterForeground: applicationWillResignActive: applicationDidEnterBackground: Suspended applicationWillTerminate: