title: ios 7 : didreceiveremotenotification fetchcompletionhandler not getting called when app kept in background for over night testing
body: <ol>
  <li><p>I have used VoIP and remote notification as background modes.</p></li>
  <li><p>I kept my application idle in background for overnight testing.</p></li>
  <li><p>I have written following code in applicationDidEnterBackground</p>
  
  <pre><code>    - (void)applicationDidEnterBackground:(UIApplication *)application
  </code></pre>
  
  <p>{</p>
  
  <pre><code>[[UIApplication sharedApplication] setKeepAliveTimeout:600 handler:^{
      NSString *message = @"voip keep alive timeout executed....";
      NSLog(@"%@",message);
       [Logger addEntry:CAT_ML_CORE andSubCategory:SUBCAT_DEBUG andMessage:message];
  }];
  </code></pre>
  
  <p>}</p></li>
  <li><p>after 1 day keeping application idle in background I found "voip keep alive timeout executed...." got printed in my logs.</p></li>
  <li><p>This indicated that my app is alive.</p></li>
  <li><p>But when I send push notification to my app "didreceiveremotenotification fetchcompletionhandler" method doesn't get called.</p></li>
  <li><p>Which is contradictory to the statement made by Apple "Unlike the application:didReceiveRemoteNotification: method, which is called only when your app is running, the system calls didreceiveremotenotification fetchcompletionhandler method regardless of the state of your app. If your app is suspended or not running, the system wakes up or launches your app and puts it into the background running state before calling the method."</p></li>
  </ol>
  
  <p>Can someone please tell me why this is happening?</p>