Slide 24
Slide 24 text
[RACSignal
createSignal:^(id
subscriber)
{
RACSignal
*locations
=
[[self
rac_signalForSelector:@selector(…didUpdateLocations:)
fromProtocol:@protocol(CLLocationManagerDelegate)]
reduceEach:^(id
_,NSArray
*locations)
{
return
locations;
}];
!
RACSignal
*error
=
[[[[self
rac_signalForSelector:@selector(…didFailWithError:)
fromProtocol:@protocol(CLLocationManagerDelegate)]
reduceEach:^(id
_,
NSError
*error)
{
return
error;
}]
filter:^
BOOL
(NSError
*error)
{
//
Documentation
says
Core
Location
will
keep
//
will
keep
trying
after
kCLErrorLocationUnknown.
return
error.code
!=
kCLErrorLocationUnknown;