큰 상거래 상점의 콘텐츠를 표시하는 기존 앱에서 기능을 확장하려고합니다. 기본적으로 iPhone에서 입력 한 이메일 주소가 고객 목록에 있는지 확인한 다음이를 기반으로 작업을 수행 할 수 있도록 앱에서 확인해야합니다. API 키와 통화 방법을 사용하여 고객 목록을 가져 왔지만 iOS에서이 작업을 가장 효과적으로 수행하는 방법을 잘 모릅니다. 누군가 내가 이것을 호출하기 위해해야 할 일에 대한 조언을 해줄 수 있습니까?BigCommerce API를 사용하여 iOS에서 고객 이메일 받기
업데이트 : 지금까지 다음 코드를 사용했습니다 : 로그에
-(IBAction)gettingcustomers {
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"mystoreserver.customers.json"]
cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData
timeoutInterval:10];
[request setHTTPMethod: @"GET"];
NSError *requestError;
NSURLResponse *urlResponse = nil;
NSData *response1 = [NSURLConnection sendSynchronousRequest:request returningResponse:&urlResponse error:&requestError];
NSLog(@"%@", requestError);
}
오류가 보여줍니다
는Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn’t be completed. (NSURLErrorDomain error -1012.)" UserInfo=0xa7d12e0 {NSErrorFailingURLKey=mystoreserver.customers.json, NSErrorFailingURLStringKey=mystoreserver.customers.json, NSUnderlyingError=0xa7da430 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1012.)"}