Push Package

A gem for creating Safari Push Packages.

This project is maintained by SymmetricInfinity


This gem provides a Ruby library and command line tool for creating a push package to be used for Safari Push Notifications.



You can use push_package as a gem:

require 'push_package'

website_params = {
  websiteName: "Bay Airlines",
  websitePushID: "web.com.example.domain",
  allowedDomains: ["http://domain.example.com"],
  urlFormatString: "http://domain.example.com/%@/?flight=%@",
  authenticationToken: "19f8d7a6e9fb8a7f6d9330dabe",
  webServiceURL: "https://example.com/push"

iconset_path = 'path/to/iconset'
certificate = 'path/to/certificate.p12' # or certificate_string
package = PushPackage.new(website_params, iconset_path, certificate, 'optional cert password')

Or you can use push_package as a command line tool

$> push_package --website-json=./website.json --iconset-path=~/project/iconset --output-dir=./ --certificate=./Certificate.p12
   wrote: ./pushPackage.zip


This gem depends on zip being in your shell's PATH

You must obtain a Website Push certificate from apple which requires a iOS developer license or a Mac developer license

Authors and Contributors

This library was written by @snatchev and @adamvduke and is used in production at ZeroPush.

Pull Requests are welcome.