0

The viewDidAppear does note fire after reopening application.

    override func viewDidAppear(_ animated: Bool) {

    super.viewDidAppear(true)

    print ("view did appear!!!")

}
Hamish
  • 78,605
  • 19
  • 187
  • 280
Lee Altman
  • 27
  • 4

1 Answers1

4

That's because when you close an application, you're not actually terminating it. The app's memory is saved and when you reopen the app, the memory is restored. From the point of view of the app, it was never closed.

If you want to be notified about reopening the app, you have to listen for the UIApplicationDidBecomeActiveNotification.

DrummerB
  • 39,814
  • 12
  • 105
  • 142