title: IOS5 - AFNetworking processing request
body: <p>I'm making an application in which I have to call some webservices. I chose to work with <a href="https://github.com/AFNetworking/AFNetworking/" rel="nofollow noreferrer">AFNetworking</a>.</p>
  
  <p>I followed the Twitter example provided in the library. Everything works well except that I have permanently the little "processing circle" in the notification bar (see the image below).</p>
  
  <p><img src="https://i.stack.imgur.com/Z3j7u.png" alt="iPhone topbar"></p>
  
  <p>Here's the code I have for my request :</p>
  
  <pre><code>- (id)initWithAttributes:(NSDictionary *)attributes
  {
      self = [super init];
      if (!self) {
          return nil;
      }
  
      _name = [attributes valueForKeyPath:@"name"];
      return self;
  }
  
  + (void)itemsListWithBlock:(void (^)(NSArray *items))block
  {
      NSUserDefaults *defaults        = [NSUserDefaults standardUserDefaults];
      NSDictionary *user              = [defaults objectForKey:@"user"];
      NSDictionary *company           = [defaults objectForKey:@"company"];
  
      NSMutableDictionary *mutableParameters = [NSMutableDictionary dictionary];
  
      /*
      ** [ Some stuff to set the parameters in a NSDictionnary ]
      */    
  
      MyAPIClient *client = [MyAPIClient sharedClient];
      [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES];
      [[AFNetworkActivityIndicatorManager sharedManager] incrementActivityCount];
  
      NSURLRequest *request = [client requestWithMethod:@"POST" path:@"getMyList" parameters:mutableParameters];
  
      AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
          NSMutableArray *mutableItems = [NSMutableArray arrayWithCapacity:[JSON count]];
          for (NSDictionary *attributes in JSON) {
              ListItem *item = [[ListItem alloc] initWithAttributes:attributes];
              [mutableItems addObject:item];
          }
          if (block) {
              block([NSArray arrayWithArray:mutableItems]);
          }
      } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON){
          [[[UIAlertView alloc] initWithTitle:@"Error" message:[error localizedDescription] delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Ok", nil] show];
          if (block) {
              block(nil);
          }
      }];
      [operation start];
  }
  </code></pre>
  
  <p>Does this means my request isn't finished ? I'm not really getting what I'm doing wrong here...</p>
  
  <p>If someone could help, I'd really appreciate. Thanks. </p>