Put it in your awakeFromNib
method. This is called on all objects that get deserialized from your nib (like your application delegate), but it isn't called until all objects are deserialized and wired (so you can use your text field, for instance). For example:
- (void)timerFired:(NSTimer*)timer
{
NSLog(@"Timer completed!");
}
- (void)awakeFromNib
{
[NSTimer scheduledTimerWithTimeInterval:30.0 target:self selector:@selector(timerFired:) userInfo:nil repeats:NO];
}
Obviously, in this simple example the timer could have been created in either the applicationDidFinishLaunching:
method or the awakeFromNib
method since it doesn't interact with any other serialized objects, but in your case, it sounds like you need the awakeFromNib
method.