Step 2. Building the Push Package - mtjddnr/SafariAPNSWithNode GitHub Wiki

  1. Prepare Information for the website.json
  • websiteName : Name which will show on Notification 2 1 1

  • 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" } ```

  1. Prepare icon.iconset images
  1. 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" } ```

  1. Build signature file
  • signature of manifest.json using PKCS #7 Sign
  1. Compress the folder into a ZIP archive

Content of zip should be 2 5 1

See node_package_maker.js

This will build pushPackages.zip