Bir çözüm bulduk, biz burada benim kodudur kullanıcının anahtarlığa Kimlik eklemem gerekiyor
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)
İlk kurtarıldı sharedCredentialStorage (1), sonra ben yeni NSURLCredential (2) kullanmak için kullanıcı adımı, parolasını ve kalıcılık türünü içeren yarattı. Bundan sonra, iki NSURLProtectionSpace hazırlandı (3) (4): HTTPS Connexion® için bir tane ve HTTP Connexion® için bir
Ve son olarak, bu ProtectionSpaces için NSURLCredential sharedCredentialStorage eklendi (5) (6)
Bu kod size yardımcı olabilir umuyoruz