I haven't experienced aggressive cancelation of my tasks unless progress doesn't advance in actual units. As I said about the bug I've filed, it seems the BGContinuedProcessingTask is ignoring the fractionCompleted property of the progress object.
In my tests, the UI doesn't show any progress (just a spinning circle) unless units of progress are completed. I'm using child progress objects and only when a child object is completed and its units are set as completed in the main Progress object, the UI updates to show it. I've worked around this by manually adding completed units from the sub-Progress object instead of adding it as a child Progress...
I've also seen that if this object is not updated with completed units regularly, then the system cancels the task unless your app is in the foreground. You don't even have to be using another app...
If I make sure I add at least one progress unit to the object every 20s, I'm not getting the tasks cancelled.
About the other matter (when to start your own work and not waiting for the BGContinuedProcessing task to start). I'm not sure if I'm understanding correctly.
If you start your process and register the task separate from that, if/when the continued processing task is started, how can you communicate a change of title/subtitle? The actual task object inside the code block is not sendable.
I guess you could at least report progress as the Progress object could be passed to another process safely, but I can't see a way to update the actual task from outside the registered code block...
Topic:
App & System Services
SubTopic:
Processes & Concurrency
Tags: