I know that if I use following nsurlconnectiondelegate it will be fixed
– connection:willSendRequestForAuthenticationChallenge: – connection:canAuthenti
Please check the following link.
https://discussions.apple.com/thread/4912924?start=0&tstart=0