title: App Delegate's application:didReceiveLocalNotification: not called
body: <p>In my app delegate the method <code>- (void)application:(UIApplication *)application didReceiveLocalNotification: (UILocalNotification *)notification</code> is never called.</p>
  
  <p>This is how I create the notification:</p>
  
  <pre><code>UILocalNotification *notification = [[UILocalNotification alloc] init];
  // set UUID, which we will store in userDefaults for later
  NSMutableDictionary *myUserInfo = [[NSMutableDictionary alloc] init];
  NSString *uuid = [[NSProcessInfo processInfo] globallyUniqueString];
  [myUserInfo setValue:uuid forKey:KEY_UUID];
  [myUserInfo setValue:@"month" forKey:KEY_UNIT];
  [myUserInfo setObject:@YES forKey:KEY_RESCHEDULE];
  NSInteger row = [_wurmProphylaxePickerView selectedRowInComponent:0];
  switch (row) {
      case 0:
          [myUserInfo setValue:@2 forKey:KEY_FREQUENCY];
          break;
      case 1:
          [myUserInfo setValue:@4 forKey:KEY_FREQUENCY];
          break;
      case 2:
          [myUserInfo setValue:@6 forKey:KEY_FREQUENCY];
          break;
      default:
          [myUserInfo setValue:@4 forKey:KEY_FREQUENCY];
          break;
  }
  notification.userInfo = myUserInfo;
  // calculate date for next notification, depends on the user's selection
  NSDate *today = [NSDate date];
  NSCalendar *calendar = [NSCalendar currentCalendar];
  NSDateComponents *myComps = [[NSDateComponents alloc] init];
  [myComps setMinute:1];
  notification.fireDate = [calendar dateByAddingComponents:myComps toDate:today options:0];
  notification.timeZone = [NSTimeZone localTimeZone];
  notification.alertBody = @"My alertBody";
  [[UIApplication sharedApplication] scheduleLocalNotification:notification];
  </code></pre>
  
  <p>And this is in my app delegates, but is never called:</p>
  
  <pre><code>- (void)application:(UIApplication *)application didReceiveLocalNotification:    (UILocalNotification *)notification
  {
      NSDictionary *userInfo = notification.userInfo;
      BOOL repeat = [[userInfo objectForKey:KEY_RESCHEDULE] boolValue];
      if (repeat)
      {
          NSInteger frequency = (NSInteger)[userInfo objectForKey:KEY_FREQUENCY];
          NSString *unit = (NSString *)[userInfo objectForKey:KEY_UNIT];
          NSString *uuid = (NSString *)[userInfo objectForKey:KEY_UUID];
  
          // calculate date for next notification
          NSDate *today = [NSDate date];
          NSCalendar *calendar = [NSCalendar currentCalendar];
          NSDateComponents *myComps = [[NSDateComponents alloc] init];
          if ([unit isEqualToString:@"month"]) {
              //[myComps setMonth:frequency];
              [myComps setMinute:frequency];
          } else {
  
          }
  
          // create new notification
          UILocalNotification *newNotification = [[UILocalNotification alloc] init];
          newNotification.fireDate = [calendar dateByAddingComponents:myComps toDate:today options:0];
          newNotification.timeZone = [NSTimeZone localTimeZone];
          newNotification.alertAction = notification.alertAction;
          newNotification.alertBody = notification.alertBody;
          newNotification.userInfo = notification.userInfo;
  
          // schedule it
          [[UIApplication sharedApplication] scheduleLocalNotification:newNotification];     
      }
  }
  </code></pre>
  
  <p>tested on iOS 8, not sure about iOS 7...</p>