I have an APP which use NSURLSession to connect the server to retrieve data. In iOS 9, it works well. Just recently iOS is about to be released and I upgrade Xcode and use iOS 10 Beta SDK... it turns out the HTTP GET request didn't contain the Cookie session information. That makes the request fail. I have searched here for iOS 10 beta's problems about cookie but not much luck. Would like to ask anyone had experienced this and any advice??? Thank you in advance.
Here is my code to create NSURLSession
NSURLSessionConfiguration *urlSessionConfig = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:EP_FETCH];
_fetchSession = [NSURLSession sessionWithConfiguration:urlSessionConfig
delegate:self // we MUST have a delegate for background configurations
delegateQueue:nil]; // nil means "a random, non-main-queue queue"
Update:
Already file a bug to Apple. Meanwhile, also found if i change
NSURLSessionConfiguration *urlSessionConfig = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:EP_FETCH];
to
NSURLSessionConfiguration *urlSessionConfig = [NSURLSessionConfiguration defaultSessionConfiguration];
Then cookie is back in HTTP request. So i wonder it is 'NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier' this api has some problems.