Skip to content

A PHP class for creating a Pass for Passbook in iOS 6. Automatically creates the manifest.json file, signs the pass and deploys it as a .pkpass file.

Notifications You must be signed in to change notification settings

ykunimoto/PHP-PKPass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP PKPass class for iOS 6 Passbook

This class provides the functionality to create an Pass for Passbook in Apple's iOS 6 on-the-fly. It creates, signs and packages the Pass as a .pkpass file according to Apple's documentation.

Requirements

  • PHP 5
  • Access to OpenSSL and Zip via PHP's exec()
  • Access to filesystem (script creates a directory temp/ for temporary files)

Usage

Please take a look at the example.php file for example usage. For more info on the JSON for the pass and how to style it, take a look at the docs at developers.apple.com.

Please note that iOS 6 and Passbook are still in beta, which means that the API can change at any moment. As new beta releases of iOS 6 come up, I'll try to update the class as soon as possible and add more features.

Requesting the Pass Certificate

  1. Go to the iOS Provisioning portal
  2. Create a new Pass Type ID
  3. Request the certificate like shown
  4. Download the .cer file and drag it into Keychain Access
  5. Right click the certificate in Keychain Access and choose 'export'
  6. Choose a password and export the file to a folder

Support

For info, mail me at tom@tomttb.com or tweet me via @tschoffelen.

About

A PHP class for creating a Pass for Passbook in iOS 6. Automatically creates the manifest.json file, signs the pass and deploys it as a .pkpass file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%