URLSession:didBecomeInvalidWithError: - should completion handler be called?

856 Views Asked by At

If a background transfer gets cancelled and URLSession:didBecomeInvalidWithError: is invoked, should we call the completion handler stored by application:handleEventsForBackgroundURLSession:completionHandler:?

1

There are 1 best solutions below

2
On

If your app is in background and application:handleEventsForBackgroundURLSession:completionHandler: was called, the completionHandler should also be called, otherwise the system will kill your app