I am using [NSTimer scheduledTimerWithTimeInterval ...]
which works fine when my application is in the foreground, but when I have it in the background it doesn't appear to be working.
What is supposed to happen is that the application calls to a web service on a periodic basis, so in the emulator I can watch it print out the communication.
I am observing the UIApplicationDidEnterBackgroundNotification
event so I can change modes, as it seems that I will need to switch to perhaps setting several scheduled notification calls, but then I run into a problem when they switch back to my application as I would then be calling the service twice for a while, or need to cancel all the notification calls.
In the emulator I am not seeing that I am going to applicationDidEnterBackground
when I bring another program to the foreground which is also of concern, but the bigger question is how should I get my calling of the method periodically whether in the foreground or background.
In case it makes any difference I am using XCode 3 and the 4.0 SDK.