• Home
  • Basics
  • DSA
  • MAD
  • Concept
  • Practice
  • Misc
  • Tips
  • QA’s
  • Home
  • Basics
  • DSA
  • MAD
  • Concept
  • Practice
  • Misc
  • Tips
  • QA’s
  • #News
  • #APPS
  • #Events
    • #WWDC
    • #I/O
    • #Ignite
  • #Let’s Talk
  • #Interview
  • #Tips

MyCodeTips mycodetips-newlogocopy1

  • Home
  • Basics
  • DSA
  • MAD
  • Concept
  • Practice
  • Misc
  • Tips
  • QA’s
IOS

iOS Application LifeCycle !!!

IOS-Appilication-Lifecycle

 

  1. App Lifecycle events are available in AppDelegate.m file.
  2. When we launching the application first time, then control will goes “application:didFinishLaunchingWithOption” method.
  3. This method will be called only once when we starts the application.
  4. All application related initilization must be take place within this method only.
  5. The next method is called during the application launch i.e “ApplicationDidBecameActive”(if URL(Uniform Resource Locator)is not present).
  6. This method may be called multiple time.
  7. If the URL is available then control will enter info OpenURL or handleOpenURL method,from here control will goes to “ApplicatonDidBecameActive” method.
  8. After applicationDidBecameActive mode control will goes to applicationWillEnterForeground method for handling UI events.
  9. When user hits Home button or any interruption occures using phone calls or message then controll will goes to applicationWillResignActive method.
  10. In this method only we required to pause application related tasks if anything is in running status.
  11. From resignActiveMethod controll will goes to applicationDidEnterBackground method. this method can hold only for 5seconds so if we required more than this time, then required to handle “beginBackGroundTaskWithExpirationHandler” method.
  12. When the application enter into background if the memory is not available then application terminated by OS.
  13. When we double tap the Home button then application will be relaunched, when we are relaunching the application the controll will enter into foreground method, from there openURL or applicationDidBecameActive method will call.
  14. Whenever the application is terminating then, applicationWillTerminate method will call.
  15. Whenever app having memory related problem then applicationDidReceiveMemoryWarning method will called.
  16. In implementation when we are working with push notification services the we require to handle 1)application:didReceiveRemoteNotification 2)application:didReceiveLocalNotification.
Liked it? Take a second to support Ranjan on Patreon!
Become a patron at Patreon!
  • Click to share on Reddit (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • More
  • Click to share on Pocket (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
Written by Ranjan - 4755 Views
AUTHOR
Ranjan

Namaste, My name is Ranjan, I am a graduate from NIT Rourkela. This website is basically about of what i learnt from my years of experience as a software engineer on software development specifically on mobile application development, design patterns/architectures, its changing scenarios, security, troubleshooting, tools, tips&tricks and many more.

Next Post
Previous Post

Support us

Subscribe for updates

Join 8,220 other subscribers

Latest Posts

  • YT-Featured-Templates--lld
    What Business Problems Solves in Low Level Design (LLD)
  • SRP-SingleResopnsibility
    SRP : Single Responsibility Principle in Swift and Objective-C
  • Designing Mobile APPS
    Limitation and restriction of designing mobile apps
  • YT-Featured-solidprinciples
    SOLID Principles of Software Design
  • IOS 16 Features
    Latest features in IOS 16
whiteboard

Whiteboard(PRO)

whiteboard

Whiteboard(lite)

alphabets

Kids Alphabet

do2day

Do2Day

  • #about
  • #myapps
  • #contact
  • #privacy
  • #Advertise
  • #myQuestions

.Net Android Blogging Cloud Concept Database DSA ERROR ExcelTips Flutter Interview IOS IOSQuestions JAVA Javascript MAC-OS No-Mouse Objective-c Programming Quick Tips SEO Software Design & Architecture Swift SwiftUI Tips&Tricks Tools Troubleshoot Videos Web Wordpress Xamarin XCode

  • What Business Problems Solves in Low Level Design (LLD)
  • SRP : Single Responsibility Principle in Swift and Objective-C
  • Limitation and restriction of designing mobile apps
  • SOLID Principles of Software Design
  • Latest features in IOS 16
MyCodeTips

©mycodetips.com