Zjistil jsem, že řešení, musíme přidat pověření klíčenkou uživatele tady je můj kód
NSURLCredentialStorage * credentialStorage=[NSURLCredentialStorage sharedCredentialStorage]; //(1)
NSURLCredential * newCredential;
newCredential=[NSURLCredential credentialWithUser:@"myUserName" password:@"myPWD" persistence:NSURLCredentialPersistencePermanent]; //(2)
NSURLProtectionSpace * mySpaceHTTP=[[NSURLProtectionSpace alloc] initWithProxyHost:@"ipProxy" port:port type:NSURLProtectionSpaceHTTPProxy realm:nil authenticationMethod:nil]; //(3)
NSURLProtectionSpace * mySpaceHTTPS=[[NSURLProtectionSpace alloc] initWithProxyHost:@"ipProxy" port:port type:NSURLProtectionSpaceHTTPSProxy realm:nil authenticationMethod:nil]; //(4)
[credentialStorage setCredential:newCredential forProtectionSpace:mySpaceHTTP]; //(5)
[credentialStorage setCredential:newCredential forProtectionSpace:mySpaceHTTPS]; //(6)
zotavil jsem nejprve sharedCredentialStorage (1), pak jsem vytvořil nový NSURLCredential obsahující své uživatelské jméno, heslo a typ perzistence k použití (2). Poté jsem vytvořil dvě NSURLProtectionSpace (3) (4): jeden pro HTTPS zapojením, a jeden pro HTTP Connexion
A konečně, i přidá NSURLCredential na sharedCredentialStorage pro tyto ProtectionSpaces (5) (6)
Doufám, že tento kód vám může pomoci