मैं एक समाधान पाया है, हम उपयोगकर्ता के कीचेन के लिए साख जोड़ने के लिए यहाँ मेरी कोड है जरूरत
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)
मैं पहली बार बरामद sharedCredentialStorage (1), तो मैं नया NSURLCredential (2) का उपयोग करने के लिए अपने उपयोगकर्ता नाम, पासवर्ड, और दृढ़ता के प्रकार युक्त बनाया। उसके बाद मैं दो NSURLProtectionSpace बनाया (3) (4): HTTPS कनेक्शन के लिए एक, और HTTP कनेक्शन के लिए एक
और अंत में, मैं NSURLCredential sharedCredentialStorage इन ProtectionSpaces के लिए जोड़ा (5) (6)
मुझे आशा है कि इस कोड को आपकी मदद कर सकता