Re: When does AppDelegate:applicationDidFinishLaunching get called?

Jonathan Prescott

Since you referenced a Window, I’m assuming MacOS application, not iOS. Probably the same, but not sure since I don’t program for iOS.

According to the documentation, applicationDidFinishLaunching is called by NSApplication just before entering into the application event loop. You could try applicationWillFinishLaunching, which is called just after the application object is initialized, which should be before any controllers are created, if that is appropriate. You could also override the init() method (Swift or Objective-C) if that makes sense.


On Jan 14, 2020, at 10:59 AM, Dave <dave@...> wrote:

Mac Project.
MacOS 10.14.6

Hi All,

I have some code that needs to be initialized before any Window/View are displayed. The App was working ok, but it looks like something has changed?

I have a call to initialise AppDelegate:applicationDidFinishLaunching BUT, the Initial Window/View Controller viewDidAppear method is being called before applicationDidFinishLaunching. Is this correct behaviour and if so where is the best place to initialise things?

Thanks a lot
All the Best

Join { to automatically receive all group messages.