title: How to display a badge with pending notifications number on IOS?
body: <p>On android, when you have pending notifications, the icon of the app will display a circle for telling the user that pending notifications exists for the app, you don't need to implement anything or adding code to the app. On iOS I see that some apps display that circle, even including a number of pending notifications. How can that be implemented? I can't find any official documentation about that.</p>
  <p>The only think I can find is this: <a href="https://github.com/ionic-team/capacitor/issues/1301" rel="nofollow noreferrer">https://github.com/ionic-team/capacitor/issues/1301</a></p>
  <p>There, an answer says that on IOS you need to include this playload:</p>
  <blockquote>
  <p>iOS differs from Android with regards to the badge-count. While on
  Android it is directly connected to the number of unhandled recieved
  notifications on iOS it's dependent upon what you yourself set it to.</p>
  <p>You need to include the badge-count in the payload:</p>
  </blockquote>
  <pre><code>{
      &quot;aps&quot; : {
          &quot;alert&quot; : &quot;You got your emails.&quot;,
          &quot;badge&quot; : 9
      }
  }
  </code></pre>
  <p>Where whould be included that playload? And which code whould be added in swift inside the ios application to display the badge with the number of pending notifications?</p>