Blog Stats
  • Posts - 199
  • Articles - 0
  • Comments - 36
  • Trackbacks - 0

 

Part 1–PassBook Server

 

So before we talked about the potential of building a server to issue and maintain Passbook passes.   The design goal to being able to issue boarding passes, concert tickets, etc. to iOS devices.

The starting point is to build a template pass that we can substitute (mail merge style),   the values that we need for our pass.   i.e to change the attendee name on each visitor pass we issue.

A passbook pass is essentially a ZIP achieve file digitally signed.    The  content of the pass is maintained with a fairly simple JSON fill,  named pass.json.   We’ll use this file as our foundation.

This is my proposed format that our server will use to build up our passes -

{
    "$$relevantDate"
    ,"locations":[
        {"longitude":-122.3748889, "latitude":37.6189722}
    ]
    ,"barcode" : {
        "$$message"
        ,"format" : "PKBarcodeFormatPDF417"
        ,"messageEncoding" : "iso-8859-1"
        ,"$$altText"
    }
    
    ,"logoText" : "Sun Airways","foregroundColor" : "rgb(22, 55, 110)","backgroundColor" : "rgb(50, 91, 185)"


    ,"boardingPass":
    {
         "transitType" : "PKTransitTypeAir"
        ,"$$headerFields"
        ,"$$secondaryFields"
        ,"$$auxiliaryFields"
        ,"$$backFields"
    }


    ,"organizationName" : "Richard Jones"
    ,"$$serialNumber"
    ,"formatVersion": 1
    ,"passTypeIdentifier" : "pass.com.binaryrefinery.www.boarding"
    ,"webServiceURL" : "https:\/\/www.binaryrefinery.com\/passhandler\/"
    ,"authenticationToken" : "12345678901234567890123456789012"
    ,"teamIdentifier" : "D3ZDFF92AK"
    ,"description" : "Boarding Pass"
}
 
My servers role will be to issue passes by substituting any variable that begins $$ into the pass body.
We will be using all Microsoft ‘stuff’ for the backend server;  so this is a good example of end-to-end integration.

Feedback

# re: Part 1–PassBook Server

Gravatar Great post, thanks for sharing 7/25/2012 8:13 AM | sma3idiot

Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 

 

 

Copyright © Richard Jones