O'Reilly logo

Instant Passbook App Development for iOS How-to by Keith D. Moon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Delivering your Pass via e-mail (Medium)

Passes can be delivered as an e-mail attachment, allowing the recipient to view the Pass and add it to their Passbook app.

Getting ready

The Pass e-mail creation script, used below, can be downloaded from the following location:

http://passkit.pro/ruby-email-script

How to do it…

  1. Save the following code into a file named send_pass_by_email.rb.
    require 'net/smtp' # This script accepts the following arguments: recipients name, recipients email address, path to Pass. # Example usage: # ruby send_pass_by_email.rb "Peter Brooke" pbrooke@passkit.pro ../Pass-Example-Generic/Pass-Example-Generic.pkpass # Retrieve command line arguments recipientName = ARGV[0] recipientEmail = ARGV[1] passFilePath = ARGV[2] # Setup template ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required