Skip to content

yasudacloud/ios_webpush_sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the repository where we have tested the operation of web push on iOS.

webpush.mp4

install

npm i

Generate VAPID Key

./node_modules/.bin/web-push generate-vapid-keys

Edit app.js

// app.js Line 11,12
const vapidPublicKey = '[Public Key here]'
const vapidPrivateKey = '[Private Key here]'

// app.js Line 15   Your Email Address
webPush.setVapidDetails(
  'mailto:hoge@example.com',
  vapidPublicKey,
  vapidPrivateKey
);

Set up a server

npm run start

hint

Must be accessed via https to work on iOS.

You can also receive web pushes at http://localhost:3000 when opened from a PC browser.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published