I'm developing iPhone app which runs in the background(iOS4), and refer "Completing a Finite Length Task in the Background" written by Apple at the following url
Then I've been able to implement background tasks.
(Of course, I see that application has 10min time limitaiton.)
However, I still can't understand what "bgTask = UIBackgroundTaskInvalid;
"(Line7,16 of Listing 4-2) means.
In my opinion, the line shown above has never been reached.
Because there is "endBackgroundTask:
" before that and the background task will be ended.
In fact, when I checked with xcode debugger, this thought may be true and not reach at Line7, 16.
If so, is this line redundant? Or is there any reason to have to be written?
I would appreciate any help about this. Thanks in advance.