Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PWAでPush通知を受け取るぞ

tmtysk
August 29, 2018

 PWAでPush通知を受け取るぞ

"第1回ゆるはち.it: PWAについてゆるく話す" https://yuruhachi-it.connpass.com/event/96878/ でお話した内容です

tmtysk

August 29, 2018
Tweet

More Decks by tmtysk

Other Decks in Technology

Transcript

  1. 8FC1VTI w 8FCٕज़Λ࢖ͬͨʮΤϯυϢʔβʹɺϦΞϧλΠϜʹΠ ϕϯτΛಧ͚Δʯ͘͠Έ w ݩʑ͸*&5'͕l8FCQVTIzͱ͍͏໊લͷ1SPUPDPMʹͭ ͍ͯ1SPQPTBMΛग़͍ͯͨ͠ ֤ॴͰදهʹΏΒ͗͋Γ  w

    8$͕ɺ"1* 1VTI"1* ࢓༷Λࡦఆத w ʮ8FCϖʔδΛݟ͍ͯͳͯ͘΋ɺ௨஌Λಧ͚ΒΕΔʯ w ͜ͷ࢓༷ʹରԠͨ͠ϒϥ΢βͱͯ͠ɺ$ISPNF 'JSFGPY  &EHF 4BGBSJ͕͋Δ IUUQTFOXJLJQFEJBPSHXJLJ1VTI@UFDIOPMPHZ8FCQVTI
  2. 1VTI"1* w 8$Ͱ࢓༷ࡦఆத 8PSLJOH%SBGU IUUQTXXXXPSH53QVTIBQJ The Push API enables sending

    of a push message to a webapp via a push service. An application server can send a push message at any time, even when a webapp or user agent is inactive. The push service ensures reliable and efficient delivery to the user agent. Push messages are delivered to a Service Worker that runs in the origin of the webapp, which can use the information in the message to update local state or display a notification to the user. This specification is designed for use with the web push protocol, which describes how an application server or user agent interacts with a push service.
  3. 1VTI"1*ͷߏ੒ཁૉ w 8FCBQQ w 1VTINFTTBHF w 1VTITVCTDSJQUJPO w 1VTITFSWJDF w

    1FSNJTTJPO IUUQTpSFCBTFHPPHMFDPNEPDTDMPVENFTTBHJOH IMKBIPX@EPFT@JU@XPSL
  4. ֤ϒϥ΢βʹରԠͨ͠1VTI4FSWJDF͕͋Δ w $ISPNFˠ'JSFCBTF$MPVE.FTTBHJOH '$.  w &EHFˠ8JOEPXT/PUJpDBUJPO4FSWJDF 8/4  w

    'JSFGPYˠ.P[JMMB1VTI4FSWJDF .14  w 4BGBSJˠ"QQMF1VTI/PUJpDBUJPO4FSWJDF "1/T ˢͱ͘΂ͭͳࢠ
  5. ͠Ό΂ͬͨਓ w !UNUZTL ൃԻͰ͖ͳ͍  w ిؾ௨৴ࣄۀऀ΍։ൃձࣾͳͲΛܦͯɺ͜͜ʹ͍·͢ w 5VNCMSͱ/HJOY͕޷͖Ͱ͢ w

    ϓϩάϥϛϯάݴޠσϏϡʔ͸#"4*$ɺशͬͨͷ͸1BTDBM w ͍ͪ͹Μ௕͘ॻ͍ͨͷ͸1)1ɺ͕࣍3VCZ͔+BWB w ٕज़ͷ࿩ͱɺγϯϓϧͰ୺తͳ΋ͷͱɺࣳډͱɺ
 ͋ͱɺͳΜ͔Χοί͍͍΋ͷ͕޷͖Ͱ͢ IUUQTUNUZTLHJUIVCJP