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];
}];
Use the method
retry
at the last point in the call chain before subscription.