title: How to set badge count in iOS 10 for pushnotification?
body: <p>I want to set badge count on app icon when notification recieved.Below method is called when notification is recieved.But the badge count does not set.</p>
  
  <pre><code>     func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -&gt; Void) {
  
          var userData = userInfo as NSDictionary? as? [AnyHashable: Any] ?? [:]
          var aps  = userData["aps"] as! NSDictionary
          var badge = aps["badge"]
          print("data is \(badge!)")
          UIApplication.shared.applicationIconBadgeNumber = badge! as! Int
          if #available(iOS 10.0, *) {
            let content = UNMutableNotificationContent()
            content.badge = 10
          } else {
            // Fallback on earlier versions
          }
          // your badge count
  }
  </code></pre>