我必须从我的应用程序中的服务器加载所有必需的详细信息。例如;我想从下面的URL加载国家详细信息。HTTPS请求无法在iPhone设备上工作
https://sub.domain.com//members/phone/XML_list_countries.php
但我得到下面的错误。但是同样的请求在模拟器中工作。
错误
Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x3b8d10 {NSErrorFailingURLStringKey=https://secure.nymgo.com//members/softphone/XML_list_countries.php, NSErrorFailingURLKey=https://secure.nymgo.com//members/softphone/XML_list_countries.php, NSLocalizedDescription=The request timed out., NSUnderlyingError=0x3b5090 "The request timed out."}
CODE
NSURL *url=[NSURL URLWithString:@"https://secure.nymgo.com//members/softphone/XML_list_countries.php"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"GET"];
NSURLConnection *_connection = [[NSURLConnection alloc] initWithRequest:_request delegate:self];
if(!_connection){
NSLog(@"Can not make this request.");
}
我已经实现了所有必需的delegate
方法。
注意:我的设备使用代理设置在Wifi中工作。
我不知道发生了什么问题。请帮我解决这个问题。
我检查了HTTP请求,它在设备上工作正常,但HTTPS不工作。 – jfalexvijay