1

I have RACObserve block and I want to retry calling until it is successfully returns. So it won't show the Error message, but it will retry to fetch. Thanks for help!

    [[[[RACObserve(self, currentLocation)
        ignore:nil]

       flattenMap:^(CLLocation *newLocation) {
           return [RACSignal merge:@[
                                     [self updateCurrentConditions],
                                     [self updateDailyForecast],
                                     [self updateHourlyForecast]
                                     ]];

       }] deliverOn:RACScheduler.mainThreadScheduler]

     subscribeError:^(NSError *error) {
         [TSMessage showNotificationWithTitle:@"Error"
                                     subtitle:@"There was a problem fetching the latest weather."
                                         type:TSMessageNotificationTypeError];
     }];
Anton Chuiko
  • 235
  • 2
  • 10

1 Answers1

1

Use the method retry at the last point in the call chain before subscription.

Charles Maria
  • 2,165
  • 15
  • 15