title: ReactiveCocoa :: Can I subscribe to a signal inside a createsignal?
body: <p>We are having some problems trying to get <code>CLLocationManager</code>working with iOS8.</p>
  
  <p>The idea is that we have a <code>LocationManager</code> that handles all location related stuff. Since iOS8 the ask for permissions deal is asynchronous, so when we try to get a location we might not have received permissions yet.</p>
  
  <p>To work this around we want to do it in a two-step fashion:</p>
  
  <ul>
  <li>First check if we already have authorization. If so, tell the subscriber <code>completed</code>.</li>
  <li>Otherwise, start updating, which will ask for permission. Once the user replied, get the status from the callback. If YES, send <code>completed</code>. If NO, send <code>error</code>.</li>
  </ul>
  
  <p>In the code below, <code>self.authorizationStatusSignal</code> is observing the callback <code>didChangeAuthorizationStatus</code>, so it will trigger whenever the user decides to give permission (or not).</p>
  
  <p>The thing is that, upon subscribing to that signal inside the creation method, the <code>subscriber</code> has lost reference and the <code>completed</code> is never delivered.</p>
  
  <p>Is it possible to subscribe like this inside the creation? We tried strongifying it but nothing happened.</p>
  
  <pre><code>- (RACSignal *)authorizationSignal {
  
  return [[RACSignal createSignal:^RACDisposable *(id&lt;RACSubscriber&gt; subscriber) {
  
      if ([self authorized:@([CLLocationManager authorizationStatus])]) {
          [subscriber sendCompleted];
  
      } else {
          [self.authorizationStatusSignal subscribeNext:^(RACTuple * args) {
  
              if ([self authorized:(NSNumber *)args.second]) {
                  [subscriber sendCompleted];
              } else {
                  [subscriber sendError:nil];
              }
          }];
      }
      return nil;
  }] replayLast];
  }
  </code></pre>