There are two delegate methods used to process ssl challenge.
The session level
(URLSession:didReceiveChallenge:completionHandler:)
and the session task level
(URLSession:task:didReceiveChallenge:completionHandler:)
If we used URLSession with background configuration to start a uploadTask, the session level didReceiveChallenge() will be called on iOS 13 and 14. (or earlier)
(uploadTask(with:fromFile:))
But on iOS 15, it's the session task level didReceiveChallenge() delegate method be called.
I wonder why the behavior had changed on iOS 15?
Thanks for reply!
Yes, only for background session.
Well, that’s weird. It definitely sounds like a bug and I recommend that you file it as such.
Please post your bug number, just for the record.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"