inicio de session api no golpear server en el primer bash es entrar en bloque de falla

siempre que se hace clic en un button de inicio de session en el primer bash, siempre entra en un bloque de fallas (la conectividad a internet no es el problema) y en el segundo bash funciona absolutamente bien … ¿alguien puede decir cuál es realmente el problema real?

AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; manager.responseSerializer = [AFJSONResponseSerializer serializer]; manager.requestSerializer = [AFJSONRequestSerializer serializer]; [manager.requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [manager POST:urlll parameters:json progress:nil success:^(NSURLSessionDataTask* task, id responseObject) { int tip=0; int bit=0; NSDictionary * myUserDictionary = responseObject; BOOL auth=[[myUserDictionary objectForKey:@"isAuth"]boolValue]; [GeneralHelper HideActivityIndicator:self.currentActivityloginView]; if(auth == YES) { NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; [prefs setObject:[myUserDictionary objectForKey:@"FullName"] forKey:@"FullName"]; [prefs setObject:[myUserDictionary objectForKey:@"EmpID"] forKey:@"EmpID"]; [prefs setObject:[myUserDictionary objectForKey:@"EmailID"] forKey:@"EmailID"]; [prefs setObject:[myUserDictionary objectForKey:@"FirstName"] forKey:@"FirstName"]; [prefs setObject:[myUserDictionary objectForKey:@"LastName"] forKey:@"LastName"]; [prefs setObject:[myUserDictionary objectForKey:@"UserStatus"] forKey:@"UserStatus"]; [prefs setObject:[myUserDictionary objectForKey:@"UserID"] forKey:@"UserID"] ; [prefs setObject:[myUserDictionary objectForKey:@"ManualRead"] forKey:@"ManualRead"] ; [self CanUserRescheduleCheck]; //Clear notifications [[UIApplication shanetworkingApplication] setApplicationIconBadgeNumber: 0]; [[UIApplication shanetworkingApplication] cancelAllLocalNotifications]; /*REMOVE THE FOLLOWING LINE TO ENABLE PROMPT FOR MANUAL*/ [prefs setObject:@"1" forKey:@"ManualRead"]; ///////////// bit = [[prefs objectForKey:@"ManualRead"]intValue]; tip = [[myUserDictionary objectForKey:@"ManualRead"] intValue]; if (bit==0) { UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"warning" message:@"Have You Read The Manual?" delegate:self cancelButtonTitle:@"YES" otherButtonTitles:@"NO", nil]; [alert show]; } if (bit==1) { _MasterVC= [[MasterViewController alloc]initWithNibName:@"MasterViewController" bundle:nil]; [_loginView removeFromSuperview]; // self.refappdele.window.rootViewController=_MasterVC; //[TestFlight passCheckpoint:@"LoginSuccess"]; [RefHelper SetMasterRef:_MasterVC]; [RefHelper GetAppRef].window.rootViewController=_MasterVC; } AppDelegate* delegate = (AppDelegate*)[UIApplication shanetworkingApplication].delegate; [delegate startLocationService]; dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ [self registerDeviceToken]; }); } else { [DialogAlerter ErrorAlerter:[NSString stringWithFormat:@"The Login failed with following error: %@",[myUserDictionary objectForKey:@"AuthMessage"]]]; NSLog(@"************* ERROR OCCURED HERE *******************"); NSLog(@"isAuth: %i", auth); } } failure:^(NSURLSessionDataTask *operation, NSError *error) { NSLog(@"Response: %@",error); [GeneralHelper HideActivityIndicator:self.currentActivityloginView]; [DialogAlerter ErrorAlerter:@"A Request Error Occunetworking: Please Try Again or Check your network connectivity"]; //[TestFlight passCheckpoint:[error localizedDescription]]; }];