Ethan Allen
Ethan Allen

Reputation: 14835

Does application didFinishLaunching in AppDelegate always get called after opening an app post-update?

Let's say you have an app on your device that you just recently closed (but didn't terminate). 5 minutes later, an app update comes through via the App Store and the app goes from 1.0 to 2.0.

When opening the app after the update, does didFinishLaunching from the AppDelegate always get called? Was the app terminated due to the update? I assume so since there could be possibly some vast code change, but I wanted to confirm.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

Upvotes: 1

Views: 1013

Answers (1)

glyvox
glyvox

Reputation: 58069

Yes, didFinishLaunchingWithOptions will always be called after an update, since apps essentially relaunch when you open then after a fresh code change (regardless of their current state).

You can easily test this behavior in a simulator - just re-run an application without closing it and set up a breakpoint in didFinishLaunchingWithOptions.

Upvotes: 1

Related Questions