My iOS app uses silent push notifications via application:didReceiveRemoteNotification:fetchCompletionHandler to trigger background refreshes.
Occasionally a refresh will time out, and when the next silent notification comes in, the original process will complete.
Should I hold onto CH1 and call it when the refresh completes, even though it's running in SN2's time allocation?
Do I call CH2 instead?
Both?
Occasionally a refresh will time out, and when the next silent notification comes in, the original process will complete.
Example:
SilentNotification SN1 with CompletionHandler CH1 is received
A background refresh process BR1 begins, but times out
SN2 later arrives, with CH2
BR1 continues now that iOS has awakened the app, and runs to completion (There's no BR2, since I'm able to detect that the BR1 is still able to be completed)
Which CompletionHandler do I call?
Should I hold onto CH1 and call it when the refresh completes, even though it's running in SN2's time allocation?
Do I call CH2 instead?
Both?