> On Mar 29, 2017, at 10:52 AM, Quincey Morris > <[email protected]> wrote: > > If willFinishLaunching is not early enough, then you can put code in your > “main” function, but I don’t know how feasible that is in Swift.
Another trick to run stuff earlier at launch is to add an -awakeFromNib method to your app delegate, or any other object in your main nib. This can be dangerous, though, because you can’t count on any other object in the nib already being awoken, since the -awakeFromNib methods are called in random order. (I once had a very hard to debug intermittent crash due to an ordering dependency between two -awakeFromNib methods.) —Jens _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
