title: JWT for sending iOS push messages from the server
body: <p>I'm currently developing server-side support for sending iOS push messages (the server's in Java if that's relevant). Apple developer documentation <a href="https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html" rel="nofollow noreferrer">"Communicating with APNs"</a> claims that one can either use a certificate or a JWT token that is just inserted into the header if HTTP/2 protocol is used. Again, as far as I understood certificates should be manually renewed every year (which seems error-prone to me) while JWTs have all the parts to be regenerated automatically over indefinitely long periods (or not?). If that's the case, I'd definitely want to try using JWT.</p>
  
  <p>Now, having zero experience with iOS development, no registration in iOS dev program and even no iOS devices, I have a hard time understanding how exactly to concoct the correct JWT. Namely, I don't get what are </p>
  
  <ul>
  <li>"A <strong>10-character key identifier</strong> (kid) key, obtained from your developer account"</li>
  <li>"The issuer (iss) registered claim key, whose value is <strong>your 10-character Team ID</strong>, obtained from your developer account"</li>
  <li>"After you create the token, you must sign it with <strong>a private key</strong>."</li>
  </ul>
  
  <p>In the last sentence I don't understand what this private key is.</p>
  
  <p>iOS developers I'm working with are not very enthusiastic about researching this topic, having given me the p12 certificate the way they always had done in the past. So, if I could point them to the right place (preferably pictures or working "paths") saying "send me this and this", my problem will hopefully be solved. If any of these are not readily available in any developer's account and should be arrived at by some process, I'm afraid I'll need these instructions as well (a working reference to docs or your own description would be perfect).</p>
  
  <p>I would be very grateful if you could confirm my assumptions about JWT in general and clarify the missing details to me.</p>