You can deliver a Pass to your users by linking to it from your website, for instance, from a confirmation page.
You will need access to your own web server, or shared hosting space with FTP access. The following instructions are for an Apache web server. Mac OSX does come with an Apache web server built in, which can be used. This used to be available under the Sharing menu in System Preferences, however since OSX 10.8 it can only be activated by the command line. You can run the following command from the Terminal, to start the web server:
The root for this server can be found at
The files we will create can be downloaded from the following location:
Save the following MIME type instruction into a file named
AddType application/vnd.apple.pkpass pkpass
Create an HTML page linking to a Pass, shown as follows, and save it as
Get your employee pass <a href='Pass-Example-Generic.pkpass'>HERE</a>
index.htmlfile and the Pass file to a publicly accessible directory on your web sever. If you are running your web server locally, place these files within the web server's root folder.
.htaccess. (The file may disappear, as files starting with a
.are treated as hidden files.)
With Mobile Safari on your iPhone, visit the URL for the
index.htmlfile on your web server.
Follow the link to your Pass and Mobile Safari will display the Pass so it can be added to Passbook.
For the Safari or Mobile Safari browser to understand a Pass file and display it to the user, your Web server needs to present the files with the MIME type of
.htaccess file tells the web server how to treat files in the folder in which resides. In this case it is instructing the web server to inform any visiting web browser that files with the file extension
pkpass are to be treated as Passes. The
.htaccess must be placed in each folder that contains a Pass.
Only users of a browser that supports this MIME type will be present with the Pass dialog, the rest will be prompted to download the Pass. While Safari and Mobile Safari support Passes, other third party browsers may not. However, the current versions of Chrome on iOS and the in-app browser from the Facebook app do support Pass display.
If you wish to add server-wide support of the Pass MIME type, you can add an entry to your Apache web server's
mimes.type file, this is located in the
conf directory. Open up the file in a text editor and add the following line in the correct alphabetical position:
You will need to restart the server for this to take effect.