In my appdelegate.m, the applicationDidFinishLaunching is not invoked. I have read that this is due to the fact my "Application"'s delegate is not properly connected, but I don't know how to connect it. What I do is right-clicking on Application from the XIB file, and drag the delegate outlet somewhere... but don't know where. Any help appreciated. Thanks !
In your MainMenu.xib, make sure there's an instance of your AppDelegate class. To make one, drag a plain object (blue cube) into the list and set its class name to AppDelegate (or whatever your app delegate class name is).
Also in the MainMenu.xib, to connect it, drag a connection from the Application object to your AppDelegate instance (the blue cube) and connect it to the delegate outlet.
Done.
Here's something to try if you've updated to Swift 3:
Take a peek at your "AppDelegate.swift" and make sure the relevant line looks like this:
func applicationDidFinishLaunching(_ aNotification: Notification) {
as opposed to this:
func applicationDidFinishLaunching(_ aNotification: NSNotification) {
I just updated an app, and didn't think to check. The result was that my app launched, but the relevant method was never called. Obviously, you should then check for other functions you have that take Notification objects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With