title: When call completionHandler with Background Fetch in iOS 7 with NSOperation
body: <p>i want integrate the Background Fetch in my iOS app, i have enabled the Background Fetch in the capabilities of the project, then i have insert this:</p>
  
  <pre><code> - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
      [application setMinimumBackgroundFetchInterval:UIApplicationBackgroundFetchIntervalMinimum];
  </code></pre>
  
  <p>to enable the background fetch with minimum interval, then in App delegate i insert the delegate method:</p>
  
  <pre><code>-(void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
  {
      NSLog(@"Call fetch iCloud");
      [[MySingleton sharedManager] startCheckOnCloud];
  }
  </code></pre>
  
  <p>My question is this, i know that i have to call this:</p>
  
  <pre><code>completionHandler(UIBackgroundFetchResultNewData);
  </code></pre>
  
  <p>somewhere, i have see a lot of example that insert that completionHandler in the <code>performFetchWithCompletionHandler</code> delegate method, but in that method i call a <code>NSOperation</code> in a <code>Singleton</code>, that operation check che iCloud folder and make some changes in a <code>Sqlite DB</code>, if i do this:</p>
  
  <pre><code>    -(void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
      {
          NSLog(@"Call fetch iCloud");
          [[MySingleton sharedManager] startCheckOnCloud];
          completionHandler(UIBackgroundFetchResultNewData);
      }
  </code></pre>
  
  <p>the operation start and do anything, maybe because the system make it sleep instantly, instead if i remove the completionHandler give me this warning:</p>
  
  <pre><code>Warning: Application delegate received call to -application:performFetchWithCompletionHandler: but the completion handler was never called.
  </code></pre>
  
  <p>so my question is, how i can handle the <code>completionHandler</code> with <code>NSOperation</code>?</p>