You Pass to Passbook


Published on

A look at what Passbook is, what passes are, how they are made, and what goes into them.

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Explain passbook, introduced at WWDC 12’ as part of iOS6
  • Store card rounded, usually with background image Generic rounded, usually no background image Event ticket notched in top center Coupon tear off Boarding pass notched on sides
  • explain fields, header, primary, additional, barcode
  • Header Fields, Primary Fields, Secondary Fields, Barcode Top is automatic and un-editable by developer Bottom are back fields
  • Images such as logos, thumbnails, backgrounds Signature, signed with certificate
  • Passes can be delivered in 1 of 3 ways.
  • This looks like a mess. Not that bad really. Let’s look a bit closer at the JSON
  • will talk about passtypeid later
  • Serial number unique to each passid
  • 2d barcodes, 1d (store barcodes) don’t read well on a screen, be sure to test with actual scanner before deploying
  • Can have additional primary fields
  • Can have additional secondary and back fields as well Use the back fields for longer verbose
  • Certificate is stored in keychain, just like app signing certificates
  • Found in iOS Provisioning portal Select pass type ids then new pass type id
  • Create a pass type id, description is internal. identifier is used in the pass.json file
  • configure pass id to get the certificate
  • generate a CSR just like when requesting a developer certificate
  • if everything went right, you’ll be able to download your completed certificate. usually takes about a minute to generate
  • we will focus on doing it in terminal for todays purpose
  • apple has good examples of passes and how to sign them
  • we will use the signpass utility provided by apple by using terminal
  • if everything went right we should see the hashes for each file used and we have successfully made a pass
  • lets go to the movies!
  • relevancies are also set in the json, additional parameters required in the json to allow for updates
  • apple suggestions
  • part 2 focuses on using passkit, which we didn’t cover tonight
  • You Pass to Passbook

    1. 1. Your Pass to Passbook Presented by: Jeremy Curcio Twitter: @Jeremy1026 Web: www.jcurcio.comEmail:
    2. 2. What Is Passbook?❖ Introduced in iOS 6❖ Allows users to digitally manage items that are traditionally physical in nature. ❖ Event Tickets ❖ Coupons ❖ Store Loyalty Cards ❖ Boarding Passes
    3. 3. Who Is Using Passbook?❖ Amtrak ❖ LivingSocial❖ Delta Airlines ❖ Starbucks❖ Fandango ❖ Many others
    4. 4. Pass Styles❖ Eachpass style serves its own purpose and has unique characteristics.❖ Each pass has a unique layout and design ❖ Makes finding specific types of passes easier
    5. 5. Coupon❖ Coupons❖ Vouchers❖ Special discount offers
    6. 6. Event Ticket❖ Used to gain entry to events ❖ Concerts ❖ Movie Tickets ❖ Sporting Events
    7. 7. Store Card❖ Loyalty cards❖ Discount cards❖ Point cards❖ Gift cards
    8. 8. Boarding Pass❖ Transit tickets ❖ Air travel ❖ Trains ❖ Ferries ❖ Buses
    9. 9. Generic❖ Anything else that doesn’t quite fit into one of the above categories, perhaps a gym membership card
    10. 10. Pass Composition
    11. 11. What Goes Into a Pass?❖A pass is very similar to the application bundle ❖ JSON File ❖ pass.json ❖ Contains all settings for the Pass ❖ Icons ❖ Images ❖ Localizations❖ Signature
    12. 12. Delivering A Pass❖ Passes can be distributed via: ❖ Email ❖ On the web through Safari ❖ Requires OS X 10.8.2+ or iOS 6+ ❖ Using the MIME Type: application/ ❖ In an App ❖ Via PassKit
    13. 13. Creating A Pass❖ Decidewhat will be the primary purpose of the pass❖ Create the JSON❖ Create applicable images❖ Sign the pass
    14. 14. Deciding The Primary Purpose Primary Purpose❖ Plane ticket? ❖ Boarding Pass❖ 10% Your Lunch Order? ❖ Coupon❖ Tickets to see “Monsters University” ❖ Event Ticket
    15. 15. Create The JSON
    16. 16. Pass.json❖ "formatVersion" : 1 ❖ 1 for now, since passes have only one format currently ❖ This may change in the future if Apple adds or removes features to future passes❖ "passTypeIdentifier" : "" ❖ Set in iOS Provisioning portal ❖ We will look at this later
    17. 17. Pass.json (Cont.)❖ "serialNumber" : "mon_001" ❖ Unique to the pass, can be anything so long as it is a string❖ "teamIdentifier" : "225CZYLDG5" ❖ Unique for each developer ❖ Assigned by Apple ❖ Same as your identifier for apps❖ "relevantDate" : "2013-06-21T13:00-20:00" ❖ Used to put the pass on the home screen at a relevant time ❖ W3C Date Format
    18. 18. Pass.json (Cont.) ❖"MON_001", "format" : "PKBarcodeFormatPDF417", "messageEncoding" ❖ Tell Apple what you want the barcode to be; Apple makes you a barcode ❖ Formats Supported ❖ PDF147 ❖ Aztec ❖ QR
    19. 19. Pass.JSON (Cont.)❖ "organizationName" : "Movie Theater 26" ❖ Name of the company/location the ticket is for❖ "description" : "Admit One" ❖ What the ticket is for❖ "foregroundColor" : "rgb(255, 255, 255)" ❖ Color of main text on the pass❖ "logoText" : "Movie Theater 26" ❖ Text directly to the right of the logo at the top of the pass
    20. 20. Pass.json (Cont.)❖ "eventTicket" : ❖ Name of array specific to the type of pass❖ "primaryFields" : ❖ Dictionary containing key, label, value for the primary fields on the pass. ❖ Things like the location the movie is playing or the title of the movie would go here ❖ Key has to be unique
    21. 21. Pass.json (Cont.)❖ "secondaryFields" : ❖ Same as primaryFields❖ "backFields" : ❖ Appears on the back of the card ❖ Optional
    22. 22. Signing The Pass❖ What we need to sign our pass ❖ Pass Type Identifier ❖ Registered on the developer portal ❖ Signing Certificate ❖ Created in the developer portal ❖ Stored in Keychain
    23. 23. Pass Type Identifier❖
    24. 24. Signing The Pass❖ Passes can be signed via multiple methods including: ❖ Desktop (Terminal) ❖ Web (Ruby, PHP, etc.) ❖ PassKit
    25. 25. Signing The Pass❖❖ Example Passes and Sample Code ❖ signpass.xcodeproj
    26. 26. Using Signpass
    27. 27. Using Signpass
    28. 28. We have a Pass!
    29. 29. More Interesting Things❖ Passes can have relevancies ❖ Relevancy allows the pass to appear on the home screen at a specific time or when the device is in a specific location❖ Passes can be updated ❖ By push notifications ❖ By in-app updates (PassKit)
    30. 30. Wrapping Up❖ Design tips ❖ Bright colors ❖ Use relevant pass styles ❖ Solid logos look best ❖ Logos are not automatically engraved ❖ Don’t overload on information ❖ Keep It Simple
    31. 31. Any Questions?But seriously, any questions? I hope not!
    32. 32. Additional Resources❖❖ WWDC 2o12 Session Video 301: Introducing Passbook Part 1❖ WWDC 2o12 Session Video 309: Introducing Passbook Part 2
    33. 33. Thank You! Your Pass to Passbook Presented by: Jeremy Curcio Twitter: @Jeremy1026 Web: www.jcurcio.comEmail: