0
我不明白这个错误。iOS获取Prestashop Web服务的问题(kCFErrorDomainCFNetwork错误-1012。)
如果有人可以帮助我从这个无限的误区弄清楚,你可以使我睡得更好;)
我小心翼翼地跟着documentation和所有工作正常,直到我切换到iOS的项目。
http://[email protected]/prestashop/api/
从iOS的身边,我得到这个代码和错误:
NSString *requestString = [NSString stringWithFormat:@"http://%@@%@/prestashop/api/", self.session.key, @"192.168.1.112"];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:requestString]];
[request setHTTPMethod:@"GET"];
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *res, NSData *data, NSError *err){
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
NSLog(@"%@", err);
[self didReceiveData:data];
}];
这里所有的代码是非常基本的,可能是太过分了? 我忘了1步从Web服务获取数据吗?
嘿@Adrien。我也在iOS项目上工作,但我无法解决登录API处理,注册新客户和更新客户的问题。你能帮我解决吗?在这里看到我的问题 http://stackoverflow.com/questions/15924253/prestashop-create-customer – Swati