GithubHelp home page GithubHelp logo

dator-zz / php-pkpass Goto Github PK

View Code? Open in Web Editor NEW

This project forked from includable/php-pkpass

0.0 1.0 0.0 1.28 MB

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.

PHP 100.00%

php-pkpass's Introduction

PHP PKPass class for iOS 6 Passbook

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

Requirements

  • PHP 5
  • PHP ZIP Support (May be installed by default)
  • Access to filesystem (Script must be able to create temporary folders)

Instalation

Composer

Run: $ composer require pkpass/pkpass: *

or add to your composer.json: "pkpass/pkpass": "dev-master"

Manual

Require PKPass.php file in yours phps require('PKPass.php');

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.

Demo:

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 'pass.<id>'โ€ฆ
  6. Choose a password and export the file to a folder

Getting the example.php sample to work

  1. Request the Pass certificate (.p12) and upload it to your server
  2. Set the correct path and password on line 6 and 7
  3. Download and import your WWDR Intermediate certificate to Keychain, export as .pem and set the correct path on line 8
  4. Change the passTypeIdentifier and teamIndentifier to the correct values, which can be found on the iOS Provisioning portal after clicking on 'Configure' next to the Pass ID, on line 15 and 17

After completing these steps, you should be ready to go. Upload all the files to your server and navigate to the address of the example.php file on your iPhone.

Support & documentation

Please read the instructions above and consult the Passbook Documentation before submitting tickets or requesting support.

Email me at tom [at] tomttb.com or tweet me @tschoffelen.

Send me a coffee

Like my work? Consider giving a small donation.

php-pkpass's People

Contributors

aeoris avatar chao avatar dododedodonl avatar ebetancourt avatar jacksonj04 avatar mac-cain13 avatar ondrejmirtes avatar ptz0n avatar tschoffelen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.