2

I am working on an OS X application which I want to modularise. I currently load the module (bundle) code at application start in the appDelegate's

applicationDidFinishLaunching(aNotification: NSNotification).

However, it is a storyboard application and coming from iOS I was surprised to learn that the storyboard, and thus all view controllers contained within it, are loaded before the applicationDid- or willFinishLaunching calls are made.

The annoying thing is that I need to have the information from the loaded module (bundle) to configure the UI, so before the UI template mehtods are called (view/windowDidLoad).

I need some place to load the module (bundle) code before the UI/Storyboard is loaded. Any ideas?

My Ideas: I Could retrigger a UI reload manually after the appDelegate calls are made, or use a splash screen window as initial window that does the loading before the main window appears, but I find both of these solutions to be unpleasing.

Related: would help me improve my understanding would be an overview of an OS X applications lauch cycle. Similar to the doc of iOS

drk
  • 21
  • 2
  • Use an init method for your delegate...or, possibly, `+initialize`? – Phillip Mills Mar 21 '16 at 12:39
  • https://developer.apple.com/library/mac/documentation/General/Conceptual/MOSXAppProgrammingGuide/CoreAppDesign/CoreAppDesign.html#//apple_ref/doc/uid/TP40010543-CH3-SW10 – rocky Mar 21 '16 at 19:21
  • 1
    Possible duplicate of [OS X storyboard calls viewDidLoad before applicationDidFinishLaunching](https://stackoverflow.com/questions/36681587/os-x-storyboard-calls-viewdidload-before-applicationdidfinishlaunching) – pkamb Jan 18 '20 at 04:21

0 Answers0