URLSession:didBecomeInvalidWithError: - should completion handler be called?

814 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 answers

2
Leonardo 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