I use NSURLProtocol and NSURLSession to do do a webview proxy request,

it works when My Proxy server is Anonymous,

but, when My proxy server required username and password, it returns the following warning

CFMachPortSetInvalidationCallBack() called on a CFMachPort with a Mach port (0x8e03) which does not have any send rights. This is not going to work. Callback function: 0x24232ea1

and the webview alert a window to ask me to fill in username and password,

when I clicked cancel button,it goes to - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *))completionHandler

and my method work.

I don't want to alert the window

who can solve my problem

thans

0

There are 0 best solutions below