2016-07-15 5 views
0

を追加していない私はRestKitバージョン0.26を使用してRestKit - 応答記述

コアデータへの応答をマップしようとこれは私が構築され、要求および記述子に私が使用するコードに使用するコードです:

-(void)getProductListProductWithPageNumber: (int) pageNumber managedObjectStore: (RKManagedObjectStore *)managedObjectStore { 

    // initialize AFNetworking HTTPClient 
    NSURL *baseURL = [NSURL URLWithString:@"https://server.com"]; 
    AFHTTPClient *client = [[AFHTTPClient alloc] initWithBaseURL:baseURL]; 

    RKObjectManager *objectManager = [[RKObjectManager alloc] initWithHTTPClient:client]; 


    objectManager.managedObjectStore = managedObjectStore; 



    RKResponseDescriptor *productListrResponseDescriptor = 
    [RKResponseDescriptor responseDescriptorWithMapping:[[CategoricalSystemDownloadManager sharedDownloadManager] getCDProductListProductMapping:managedObjectStore] 
               method:RKRequestMethodGET 
              pathPattern:@"/PLController/plProducts/:" 
               keyPath:nil 
              statusCodes:[NSIndexSet indexSetWithIndex:200]]; 

    [objectManager addResponseDescriptor:productListrResponseDescriptor]; 

    [objectManager getObjectsAtPath:[NSString stringWithFormat:@"/PLController/plProducts/currentResponseBody-%d", pageNumber] 
         parameters:nil 
          success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) { 

          } 
          failure:^(RKObjectRequestOperation *operation, NSError *error) { 
          }]; 
} 

マップされたJSONは配列 - >キーパスnilですか? それは次のようになります [ { "商品コード":240、 "brandId":69 } ]

これは私がpathPatternを台無しエラー

which failed to match all (0) response descriptors 

答えて

0

あります。/PLController/plProducts /:currentResponseBody

です。
関連する問題