Joined April 2013
·

Philippe Converset

AutreSphere
·
Paris, France
·
·
·

Hi Sidney,

You can create an NSURLProtectionSpace like that:
NSURL *url = [NSURL URLWithString:@"http://www.example.com"];
protectionSpace = [[NSURLProtectionSpace alloc] initWithHost:url.host
port:[url.port integerValue]
protocol:url.scheme
realm:nil
authenticationMethod:NSURLAuthenticationMethodHTTPDigest];

Please have a look at a more detailed explanation on http://stackoverflow.com/questions/8565087/afnetworking-and-cookies/17997943#17997943

Phil

Achievements
391 Karma
25,944 Total ProTip Views
Interests & Skills