Add badge when push received in Swift <p>I have iOS app written in Swift. I use Parse SDK for push notifications. I want to add badge to app icon when push is received. <strong>There is problem - I can't add badge from push directly</strong> because there are a lot of users that use previous version of my app. And if I add badge from push - this badge will not disappear because previous app versions don't hide badge after it opened. So badge will be always on icon. </p> <p>So what I want is to handle push by my app. No matter is it running or not. If push arrives - my app adds badge. So I can I handle push by my app if it is not running?</p> <p>I know how to add badge with Swift</p> <pre><code>application.applicationIconBadgeNumber = 5 </code></pre> <p>But how can i do it without opening the app - just when push is received? </p>