title: Push Notification not working in iOS 8 using Parse.com
body: <p>i have a code that works in iOS 7, i receive all the Push Notifications.</p>
  
  <p>When implementing the new iOS 8 Push Notification using Parse.com, i can't make it work.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions     
      // Register for push notifications
      [Parse setApplicationId:@"XXXX" clientKey:@"XXX"]; // REMOVED IDS FOR SECURITY REAS
  
      if ([[[UIDevice currentDevice] systemVersion] floatValue] &gt;= 8.0) {
  
          UIMutableUserNotificationAction *viewAction = [[UIMutableUserNotificationAction alloc] init];
          viewAction.identifier = @"medphone-view";
          viewAction.title = @"Ver";
          viewAction.activationMode = UIUserNotificationActivationModeForeground;
          viewAction.destructive = NO;
  
          UIMutableUserNotificationAction *dismissAction = [[UIMutableUserNotificationAction alloc] init];
          dismissAction.identifier = @"medphone-dismiss";
          dismissAction.title = @"Excluir";
          dismissAction.activationMode = UIUserNotificationActivationModeBackground;
          dismissAction.destructive = YES;
  
          UIMutableUserNotificationCategory *category = [[UIMutableUserNotificationCategory alloc] init];
          category.identifier = @"medphone";
          [category setActions:[NSArray arrayWithObjects:viewAction, dismissAction, nil] forContext:UIUserNotificationActionContextDefault];
  
          NSSet *categories = [NSSet setWithObjects:category, nil];
  
          UIUserNotificationType types = UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert;
          UIUserNotificationSettings *mySettings = [UIUserNotificationSettings settingsForTypes:types categories:categories];
          [application registerUserNotificationSettings:mySettings];
          [application registerForRemoteNotifications];
  
      } else {
          [application registerForRemoteNotificationTypes:
           UIRemoteNotificationTypeBadge |
           UIRemoteNotificationTypeAlert |
           UIRemoteNotificationTypeSound];
      }
  
      if (launchOptions) { //launchOptions is not nil
          NSDictionary *userInfo = [launchOptions valueForKey:@"UIApplicationLaunchOptionsRemoteNotificationKey"];
          NSLog(@"Push info %@", userInfo);
          NSDictionary *apsInfo = [userInfo objectForKey:@"aps"];
  
          if (apsInfo) { //apsInfo is not nil
              NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
              [prefs setValue:userInfo forKey:@"PUSHDATA"];
              [prefs setBool:YES forKey:@"PUSH"];
              [prefs synchronize];
              NSLog(@"entrou no UIApplicationLaunchOptionsRemoteNotificationKey %@", apsInfo);
          }
      }
  
      return YES;
  }
  
  And these other methods:
  
      - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
      PFInstallation *currentInstallation = [PFInstallation currentInstallation];
      [currentInstallation setDeviceTokenFromData:deviceToken];
      currentInstallation.channels = @[@"global"];
      [currentInstallation saveInBackground];
  }
  
      - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
      [[NSNotificationCenter defaultCenter] postNotificationName:@"pushNotification" object:userInfo];
      NSLog(@"entrou no didReceiveRemoteNotification %@", userInfo);
  }
  
  #ifdef __IPHONE_8_0
  - (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
      //register to receive notifications
      [application registerForRemoteNotifications];
  }
  
      - (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void(^)())completionHandler {
      NSLog(@"entrou no UIApplicationLaunchOptionsRemoteNotificationKey %@", userInfo);
  
      //handle the actions
      if ([identifier isEqualToString:@"medphone-view"]) {
          NSLog(@"ver");
      } else if ([identifier isEqualToString:@"medphone-dismiss"]) {
          NSLog(@"dismmis");
      }
      completionHandler();
  }
  
  
  
  #endif
  </code></pre>
  
  <p>Is there anything i`m doing wrong? The payload is correct, bacause its working on iOS 7. And the category is set.</p>
  
  <p>Please me let me know!</p>