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