{"action":"created","issue":{"url":"https://api.github.com/repos/AFNetworking/AFNetworking/issues/3106","labels_url":"https://api.github.com/repos/AFNetworking/AFNetworking/issues/3106/labels{/name}","comments_url":"https://api.github.com/repos/AFNetworking/AFNetworking/issues/3106/comments","events_url":"https://api.github.com/repos/AFNetworking/AFNetworking/issues/3106/events","html_url":"https://github.com/AFNetworking/AFNetworking/issues/3106","id":114041041,"number":3106,"title":"redirect delegate method in AFURLSessionManager is not called for Apple Watch","user":{"login":"amichaim","id":15232830,"avatar_url":"https://avatars.githubusercontent.com/u/15232830?v=3","gravatar_id":"","url":"https://api.github.com/users/amichaim","html_url":"https://github.com/amichaim","followers_url":"https://api.github.com/users/amichaim/followers","following_url":"https://api.github.com/users/amichaim/following{/other_user}","gists_url":"https://api.github.com/users/amichaim/gists{/gist_id}","starred_url":"https://api.github.com/users/amichaim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amichaim/subscriptions","organizations_url":"https://api.github.com/users/amichaim/orgs","repos_url":"https://api.github.com/users/amichaim/repos","events_url":"https://api.github.com/users/amichaim/events{/privacy}","received_events_url":"https://api.github.com/users/amichaim/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AFNetworking/AFNetworking/labels/watchOS","name":"watchOS","color":"69B805"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-29T12:42:19Z","updated_at":"2015-11-16T14:11:49Z","closed_at":null,"body":"I use AFURLSessionManager with redirect on iPhone app and I can see the redirect delegate method \r\n\r\n- (void)URLSession:(NSURLSession *)session\r\n              task:(NSURLSessionTask *)task\r\nwillPerformHTTPRedirection:(NSHTTPURLResponse *)response\r\n        newRequest:(NSURLRequest *)request\r\n completionHandler:(void (^)(NSURLRequest *))completionHandler\r\n\r\nis called.\r\n\r\nThe same situation running on Apple Watch, that delegate method is not called, and the redirection is done automatically without running via that delegate.\r\n\r\nDoes that an expected behaviour?\r\n\r\nOther delegate methods like\r\n\r\n- (void)URLSession:(NSURLSession *)session\r\n              task:(NSURLSessionTask *)task\r\ndidCompleteWithError:(NSError *)error\r\n\r\nis called for the Watch.\r\n\r\nI saw in the documentation of NSURLSessionTaskDelegate regarding the redirect method:\r\n\"This method is called only for tasks in default and ephemeral sessions. Tasks in background sessions automatically follow redirects.\" \r\nCould it be the Watch using background session?\r\n"},"comment":{"url":"https://api.github.com/repos/AFNetworking/AFNetworking/issues/comments/157041448","html_url":"https://github.com/AFNetworking/AFNetworking/issues/3106#issuecomment-157041448","issue_url":"https://api.github.com/repos/AFNetworking/AFNetworking/issues/3106","id":157041448,"user":{"login":"amichaim","id":15232830,"avatar_url":"https://avatars.githubusercontent.com/u/15232830?v=3","gravatar_id":"","url":"https://api.github.com/users/amichaim","html_url":"https://github.com/amichaim","followers_url":"https://api.github.com/users/amichaim/followers","following_url":"https://api.github.com/users/amichaim/following{/other_user}","gists_url":"https://api.github.com/users/amichaim/gists{/gist_id}","starred_url":"https://api.github.com/users/amichaim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amichaim/subscriptions","organizations_url":"https://api.github.com/users/amichaim/orgs","repos_url":"https://api.github.com/users/amichaim/repos","events_url":"https://api.github.com/users/amichaim/events{/privacy}","received_events_url":"https://api.github.com/users/amichaim/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T14:11:49Z","updated_at":"2015-11-16T14:11:49Z","body":"any news on that?"}}