Does anyone know how to capture failed mapping event?

20 views
Skip to first unread message

jervin

unread,
Jul 19, 2012, 4:36:16 PM7/19/12
to res...@googlegroups.com
So I know there is a RKObjectMapperDelegate which if adopted would allow me to be notified of failed mappings. But I am not sure how to get access to the actual ObjectMapper when the mappings happen.

Here is how I make my requests.

- (void) fetchThingsWithDelegate:(id)aDelegate {
    if (nil != self) {
       
        [self.objectManager setClient:[RKClient sharedClient]];
        [[RKClient sharedClient] setUsername:[self.prefs objectForKey:kUserDefaultsCurrentUsername]];
        [[RKClient sharedClient] setPassword:[self.prefs objectForKey:kUserDefaultsCurrentPassword]];
        [[RKClient sharedClient] setServiceUnavailableAlertEnabled:YES];

        NSString *path = [NSString stringWithFormat:@"/attributes/things?login_id=%@&password=%@",
                          [self.prefs objectForKey:kUserDefaultsCurrentUsername], [self.prefs objectForKey:kUserDefaultsCurrentPassword]];
       
       
        self.loader = [self.objectManager loaderWithResourcePath:path];
        loader.delegate= aDelegate;
        loader.userData = kUserDefaultsRooms;
        loader.method = RKRequestMethodGET;
       
       
        [loader send];
       

jervin

unread,
Jul 23, 2012, 9:20:50 AM7/23/12
to res...@googlegroups.com
Hello? Is this thing on?

Again RKObjectMapperDelegate is adoptable, but the only ObjectMapper to delegate for is pretty deep within the RK code. Anyone have a solution?
Reply all
Reply to author
Forward
0 new messages