applicationDidBecomeActive getting called twice

If you want to call your code only once when app becomes active, try calling it from two methods.

  1. didFinishLaunchingWithOptions
  2. applicationWillEnterForeground

instead of calling it only from applicationDidBecomeActive.


I got the issue. I am using Location Services. When launching for the first time after I tap on "OK" on the location services alert, my applicationDidBecomeActive gets called one more time which is the normal iOS behavior.


This is because of location or push notification alert.

After the native location/push notification has been dismissed, applicationDidBecomeActive will be called.