title: Firebase push notification alert sound is not playing in background mode in iOS 10
body: <p>I am implementing Apple push notification in my native iOS app.
  Push notification is implemented via FireBase.
  It's working perfect in iOS 9 &amp; earlier.</p>
  
  <p>I am facing one issue in iOS 10. Push notification is working fine for in iOS 10 with other state but <strong>When app is in background, sound of my push notification is not playing.</strong>
  For other state of app , it's all ok.
  Only issue with background mode.</p>
  
  <p>Below is my code for Implement push notification.</p>
  
  <p>Insdie</p>
  
  <pre><code>-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  </code></pre>
  
  <p>Below is Registration code:</p>
  
  <pre><code>////////// FireBase////////////
      // Register for remote notifications
      if (floor(NSFoundationVersionNumber) &lt;= NSFoundationVersionNumber_iOS_7_1) {
          // iOS 7.1 or earlier. Disable the deprecation warnings.
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wdeprecated-declarations"
          UIRemoteNotificationType allNotificationTypes =
          (UIRemoteNotificationTypeSound |
           UIRemoteNotificationTypeAlert |
           UIRemoteNotificationTypeBadge);
          [application registerForRemoteNotificationTypes:allNotificationTypes];
  #pragma clang diagnostic pop
      } else {
          // iOS 8 or later
          // [START register_for_notifications]
          if (floor(NSFoundationVersionNumber) &lt;= NSFoundationVersionNumber_iOS_9_x_Max) {
              UIUserNotificationType allNotificationTypes =
              (UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge);
              UIUserNotificationSettings *settings =
              [UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil];
              [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
          } else {
              // iOS 10 or later
  
  #if defined(__IPHONE_10_0) &amp;&amp; __IPHONE_OS_VERSION_MAX_ALLOWED &gt;= __IPHONE_10_0
              UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
              center.delegate = self;
              [center requestAuthorizationWithOptions:(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge) completionHandler:^(BOOL granted, NSError * _Nullable error){
                  if( !error ){
                      [[UIApplication sharedApplication] registerForRemoteNotifications];
                  }
              }];
  
              [[FIRMessaging messaging] setRemoteMessageDelegate:self];
  #endif
          }
  
          [[UIApplication sharedApplication] registerForRemoteNotifications];
          // [END register_for_notifications]
      }
  
  
      [FIRApp configure];
      // [END configure_firebase]
      // Add observer for InstanceID token refresh callback.
      [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tokenRefreshNotification:)
                                                   name:kFIRInstanceIDTokenRefreshNotification object:nil];
  </code></pre>
  
  <p>Below are the delegate(s) for manage received notification.</p>
  
  <pre><code>- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
  fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
  
      NSLog(@"Message ID: %@", userInfo[@"gcm.message_id"]);
      NSLog(@"%@", userInfo);
  
      [self manageAppAfterReceiveNotific: userInfo];
      completionHandler(UIBackgroundFetchResultNewData);
  }
  
  #if defined(__IPHONE_10_0) &amp;&amp; __IPHONE_OS_VERSION_MAX_ALLOWED &gt;= __IPHONE_10_0
  -(void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)())completionHandler{
  
      NSDictionary *userInfo = response.notification.request.content.userInfo;
      [self manageAppAfterReceiveNotific: userInfo];
  }
  -(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler{
  
      completionHandler(UNNotificationPresentationOptionAlert);
  }
  
  - (void)applicationReceivedRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage {
  
      NSLog(@"%@", [remoteMessage appData]);
  
      [self manageAppAfterReceiveNotific: [remoteMessage appData]];
  }
  #endif
  </code></pre>
  
  <p>Below is my PayLoad :</p>
  
  <pre><code>{
      aps =     {
          alert =         {
              body = "any text";
              title = "New Notification";
          };
          badge = 1;
          "content-available" = 1;
          sound = default;
      };
      extra = "{\"childrenId\":\"48\",\"timestamp\":\"1479724388\"}";
      "gcm.message_id" = "Message ID";
      noteType = "CHECK_OUT";
  }
  </code></pre>