title: How to fire a local notification in backround mode?
body: <p>After fetching new data in background, if any, I want to fire a local notification. I did this: </p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
  
      if ([application respondsToSelector:@selector(registerUserNotifitacionSetting:)]) {
  
          [application registerUserNotifitacionSetting:[UIUserNotificationSettings settingForTypes: UIUserNotificationTypeAlert|UIUserNotificationTypeBadge categories:nil]];
      }
      return YES;
  }
  
  - (void) application:(UIApplication *) application performFetchWithCompletionHandler: (void(^) (UIBackgroundFetchResult)) completionHandler {
  
      [self SendNotification];
  
      completionHandler(UIBackgroundFetchResultNewData);
  
  }
  
  -(void) SendNotification {    
      UILocalNotification *notification = [[UILocalNotification alloc]init];
  
      [notification setAlertBody:@"My text"];
      [notification setFireDate:[NSDate dateWithTimeIntervalSinceNow:30]];
      [notification setTimeZone:[NSTimeZone defaultTimeZone]];
      notification.category = @"my category";
      [[UIApplication sharedApplication] scheduleLocalNotification:notification];
  }
  </code></pre>
  
  <p>In settings project I set Background Fetch and Remote Notification.
  When debugging logs in <code>-(void) application:(UIApplication *) application performFetchWithCompletionHandler: (void(^) (UIBackgroundFetchResult)) completionHandler</code> not displayed.</p>
  
  <p>Please, tell me what am I doing wrong?</p>