title: iOS 7 remote notification background mode
body: <p>I'm realy confused about this subject, my question is simple: when the <code>application: didReceiveRemoteNotification: fetchCompletionHandler:</code> will be called?</p>
  
  <ol>
  <li><p>if the application is running and in foreground ? i test and the response is yes for iOS 7 and no in iOS 6 as described in the function comment.</p></li>
  <li><p>if the application is in background and running ? response: same as 1.</p></li>
  <li><p>if the application is in background but suspended by the system ? </p></li>
  <li><p>most importent point: if the application is killed (not in the "multitask view")?</p></li>
  </ol>
  
  <p>how i activate/handel the notification :</p>
  
  <ol>
  <li>add the remote motif in xcode capabilities section (in info.plist).</li>
  <li>ask to register : </li>
  </ol>
  
  <blockquote>
    <p>[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
         UIRemoteNotificationTypeBadge |
         UIRemoteNotificationTypeSound |
         UIRemoteNotificationTypeAlert |
         UIRemoteNotificationTypeNewsstandContentAvailability]</p>
  </blockquote>
  
  <p>3 . implement the delegate method. (add inside <code>completionHandler(UIBackgroundFetchResultNewData);</code>)</p>
  
  <p>when i send a notification (with the content-available key==1) :</p>
  
  <ol>
  <li>if the app is in foreground/background and running the function is triggered and the code inside is performed (i download an image and save it in documents folder).</li>
  <li>if the app is killed, the image is not downloaded.</li>
  </ol>
  
  <p>second question : have you any easy why to debug remote notification background mode?</p>
  
  <p><code>[edit]</code> after tests, if the app is suspended (we add a loop to log date) it receive the notification and try to trigger code, but the app is stopped after 1 seconde, have we miss a parameter to encase duration ? (as i read the maximum is 30 secondes).</p>