node 에서 apns 푸시 메시지를 Slient 로 보내는 방법
노드에서 아이폰으로 사일런트 푸시를 보낼 때 방법이다. 나 같은 경우는 수면 알람을 깨우는데 사용한다. 버전은 apn 2.2.0 을 사용했다. 이 버전이 노드 16 이상을 요구해서 노드를 업그레이드 했다. 먼저 선언을 한다. const  apn =  require ( ' apn ' ); 그런 다음 보내기 위한 옵션을 설정한다. var  options =  {     token :  {         key :  " ./AuthKey_XXXX.p8 " ,         keyId :  " XXXX " ,         teamId :  " XXXX "     },     production :  false }; var  apnProvider =  new  apn. Provider (options); 수면 알람이 분단위로 측정되기 때문에 매분마다 수행하는 루틴을 작성 후  그 안에 로직을 추가하였다. setInterval ( async  function  () {     let  notification =  new  apn. Notification ();     notification.topic =  " 앱 번들 아이디 "     notification.priority =  5     notification.pushType =  " Background "     notification.rawPayload =  {         aps :  {             " content-available " :  1         },         acme1 :  " bar " ,         acme2 :  42     }     apnProvider. send (notification, i.token). then (( result ) =>  {         console . log ( JSON . stringify (...