Update pending notifications in iOS 10
<p>I have this function below:</p>

<pre><code>@objc func decrementBadges(){
    let center = UNUserNotificationCenter.current()

    center.getPendingNotificationRequests(completionHandler: { (notifications) in
        print("count", notifications.count)
        for notification in notifications{
            //center.removePendingNotificationRequests(withIdentifiers: notification.title)
            print(notification.content.badge)
            print(notification.description)
        }
    })
}
</code></pre>

<p>I am trying to decrement the badge numbers on all the pending notifications. Is this possible? The notification.content.badge is read only and I can't figure out a way to set it.</p>