Tuesday, 15 April 2014

ios - Restkit is freezing -



ios - Restkit is freezing -

i have bug under ios 8 freezes iphone app. during loading info backend using restkit don't know why code in :getobjectsatpath method not executed. i'm assuming there should returned code success or failure block of method. looks rest kit trying info backend can see network activity indicator spinner still active. have no thought how perchance investigate issue because xcode not homecoming error. app still working can't tap on button jump parent view.

-(void)loadalerts{ _credentials = [[efcredentials alloc]init]; nsstring *remembertoken = [_credentials authtoken]; if ([efreachabilitymanager isreachable]) { [[[rkobjectmanager sharedmanager]httpclient]setdefaultheader:@"authorize" value:remembertoken]; rkresponsedescriptor *responsedescriptor = [rkresponsedescriptor responsedescriptorwithmapping:[efmappingprovider alertsmapping] method:rkrequestmethodget pathpattern:[nsstring stringwithformat:@"/%@/alerts.json",_id] keypath:nil statuscodes:rkstatuscodeindexsetforclass(rkstatuscodeclasssuccessful)]; [[rkobjectmanager sharedmanager]addresponsedescriptor:responsedescriptor]; [[rkobjectmanager sharedmanager] getobjectsatpath:[nsstring stringwithformat:@"/wearers/%@/alerts.json",_wearer_id] parameters:nil success:^(rkobjectrequestoperation *operation, rkmappingresult *mappingresult){ nslog(@"%@",mappingresult.array); [self.tableview reloaddata]; } failure:^(rkobjectrequestoperation *operation, nserror *error) { uialertview *alertview = [[uialertview alloc] initwithtitle:@"error" message:[error localizeddescription] delegate:nil cancelbuttontitle:@"ok" otherbuttontitles:nil]; [alertview show]; } ]; } else{ _alertviewreachability = [[uialertview alloc]initwithtitle:@"error" message:@"no network connection " delegate:self cancelbuttontitle:@"cancel" otherbuttontitles:@"try again", nil]; [_alertviewreachability show]; }

}

libsystem_kernel.dylib`semaphore_wait_trap: 0x196954eb0: movn x16, #35

0x196954eb4: svc #128

0x196954eb8: ret

it looks possible deadlock. refreshdata: method in efalertshistorytvc responding notification. perhaps in method waiting synchronously info won't available until method returns.

ios ios8 restkit

No comments:

Post a Comment