views:

85

answers:

1

Hi all, I have a very basic doubt regarding the method that gets executed when app becomes active. So this is the sequence 1.User executes an application for sometime

2.User presses the home button and goes to use someother app for sometime

3.User presses the home button and resumes using my app again.

My question is which method gets executed in step 3.(applicationDidBecomeActive,applicationDidFinishLaunching,applicationWillResignActive) In simulator, when I try to simulate the same sequence, none of these methods gets executed. But when I quit the simulator and execute it again, applicationDidBecomeActive,applicationDidFinishLaunching gets executed. Is this specific to simulator or is this the same thing that happens in the iPhone and iPodTouch

Thanks :)

+3  A: 

The callback methods will be run everytime your app runs - if you are trying to check that those methods are being called using the debug log you won't get any output to the debug log if you stop the debugger and then just launch the app on the simulator since it's not starting a new debugger session in xcode it's just running the app in the simulator.

(I'm making a couple of assumption that might be wrong about how you're checking things so correct me if I'm wrong.)

paulthenerd
Hi Paul, Thanks for the answer. Just like you said, I was using NSLog :). Your answer was very clear. Thank you very much :)
Felix