NSURLSession seems to ignores cookies when following a redirect when configured with backgroundSessionConfigurationWithIdentifier().
I have tested this on iOS 8.4 and iOS 9.3.
Has anybody else seen this behaviour?
My use of NSURLSession works fine when using the defaultSessionConfiguration(), but fails to store a authentication cookie that is delivered as part of a redirect when configured with the background. The cookie has the Secure flag set, and is delivered as part of a HTTPS session.
As I said, the code does work with the default config but fails using the background configuration. This is true when the iOS app is in the foreground or the background.
The docs state that redirects in the background are followed automatically without waking the app. Could this part of iOS be forgetting to read the Headers for cookies?
Any ideas??