Step 2. Building the Push Package - mtjddnr/SafariAPNSWithNode GitHub Wiki
- Prepare Information for the
website.json
-
websiteName: Name which will show on Notification
-
websitePushID: Push Id you created in Step 1. -
allowedDomains: Website domains (ex: http://apple.com, http://www.apple.com User may enter the site with two different subdomains) -
urlFormatString: URL to Safari when user clicks Notification. This is used as [NSString stringWithFormat:@"http://host/?id=%@&code=%@", ... -
authenticationToken: User Identifer -
webServiceURL: URL of this https server -
Example
{ "websiteName":"Back to the Mac", "websitePushID":"web.com.tistory.macnews", "allowedDomains":[ "http://macnews.tistory.com" ], "urlFormatString":"http://macnews.tistory.com/%@", "authenticationToken":"51c799bcbf18289ee31ff2cbfe4afcd53f71f909", "webServiceURL":"https://mini.smoon.kr" } ```
- Prepare icon.iconset images
icon_16x16.png: 16 x 16 pixels[email protected]: 32 x 32 pixelsicon_32x32.png: 32 x 32 pixels[email protected]: 64 x 64 pixelsicon_128x128.png: 128 x 128 pixels[email protected]: 256 x 256 pixels
- Prepare
manifest.json
-
SHA1 Hash value of 6 image files and
website.json -
Example
{ "icon.iconset/icon_16x16.png": "7b14c04ea0a1504877f41638ca86dbd2d9f2ff64", "icon.iconset/[email protected]": "c1cc15749c85424169d648b52f83efad11e636f6", "icon.iconset/icon_32x32.png": "c1cc15749c85424169d648b52f83efad11e636f6", "icon.iconset/[email protected]": "36254154c579dd1f24263629dba74786d6c8c2c5", "icon.iconset/icon_128x128.png": "23a08355e2e4650ad8cd620e0ccc935d00bbddb3", "icon.iconset/[email protected]": "44d3a3597c346a62c3828bb53202658c638e484f", "website.json": "8bdc6fd9589c575606e95d3ce09f79f95965b8c0" } ```
- Build
signaturefile
- signature of
manifest.jsonusing PKCS #7 Sign
- Compress the folder into a ZIP archive
- package/
- icon.iconset/
icon_16x16.png[email protected]icon_32x32.png[email protected]icon_128x128.png[email protected]
website.jsonmanifest.jsonsignature
- icon.iconset/
Content of zip should be

This will build pushPackages.zip