iOS 15 URLSessionManager didReceiveChallenge() issue

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!

Answered by DTS Engineer in 693609022

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"

Do you only see this change for background sessions?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

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"

iOS 15 URLSessionManager didReceiveChallenge() issue
 
 
Q