Realn0whereman
Realn0whereman

Reputation: 1226

applicationDidFinishLaunching not running

So I'm starting out with cocoa and ObjC. I'm trying to follow the example in the up and running objective C/cocoa book from oreilly. My applicationDidFinishLaunching doesn't seem to be getting called. I think it's a problem with the way I hooked everything up in the IB.

Header: http://pastebin.com/6AdQt1uN

Class: http://pastebin.com/VCQWJWkj

IB: http://img265.imageshack.us/img265/4616/screenshot20110216at111.png

Does anyone see anything obvious that my untrained eyes do not?

Upvotes: 10

Views: 6446

Answers (3)

Fabio Napodano
Fabio Napodano

Reputation: 1249

for those who do not use IB, make sure you specify the app delegate in main.m in the following way:

        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));

instead of:

        return UIApplicationMain(argc, argv, nil, nil);

Upvotes: 0

Dominic
Dominic

Reputation: 3304

Does your Application object have it's delegate set to your Application App Delegate object? Right click on Application in your IB window and set the delegate outlet to be your Application App Delegate object.

Upvotes: 18

Michael J. Barber
Michael J. Barber

Reputation: 25032

A guess: you didn't set the object where you defined applicationDidFinishLaunching as the delegate for your app.

Upvotes: 2

Related Questions