2013-09-28 9 views
0

iOS DataStore API를 사용하여 StackMob에 데이터를 업로드하고 있습니다. 내 공개 키로 초기화 된 smclient를 사용하려고하면이 오류가 발생합니다.stackmob ios datastore http 401 오류

나는이 항목을 작성하기 위해 사용자 자격 증명 로그인 사용하지 않아도이 사용 사례를 들어

self.smclient = [[SMClient alloc] initWithAPIVersion:@"0" publicKey:@"xxxxxxxxxx"]; 

을 다음과 같이

HTTP Code=401 "The operation couldn’t be completed. (HTTP error 401.)" UserInfo=0xa14dac0 {error=Insufficient authorization} 

[[self.smclient dataStore] createObject:eventDictObj 
              inSchema:@"EventSchema" 
             onSuccess:^(NSDictionary *object, NSString *schema) 
              { 
               NSLog(@"Created online event : %@", object); 
               successBlock(); 
              } 
             onFailure:^(NSError *error, NSDictionary* object, NSString *schema) 
              { 
               failedBlock(error); 
              }]; 

그리고 smclient 샘플 코드가 초기화됩니다 StackMob

답변

0

스택 mob 데이터베이스에서 열기 권한으로 설정되어 있는지 확인하십시오.