title: Unable to retain data even using __block
body: <p>I have been using the AFNetworking library for some time now, and I just ran into a problem.  I used the following code, which uses the GET function to receive data from a remote PHP file.</p>
  
  <pre><code>AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
  manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
  __block NSDictionary *data = nil;
  
  [manager GET:@"..." parameters:nil success:^(NSURLSessionTask *task, id responseObject) {
      data = responseObject;
  } failure:^(NSURLSessionTask *operation, NSError *error) {
      NSLog(@"Error: %@", error);
  }];
  
  _objects = [[data allKeysForObject:@"type"]mutableCopy];
  </code></pre>
  
  <p>As you see, I created a local NSDictionary variable and set it to nil, as another Stack Overflow post told me to.  Inside the brackets, everything looks alright; data is filled.  However, outside the brackets, <code>data</code> is completely empty.  Any ideas why this might not work?  Thanks in advance.</p>
  
  <p><strong>EDIT</strong>
  As matiboo kindly stated in the comments, I realized that AFNetworking ran on a different thread than the main, which happened to execute before everything else.</p>
  
  <p>I still, however, do not know how to fix this.  Should I make a function to handle this?</p>