Академический Документы
Профессиональный Документы
Культура Документы
These are confidential sessionsplease refrain from streaming, blogging, or taking pictures
Ecosystem
Server Companion App
Conduit App
Ecosystem
Server Companion App
Conduit App
Ecosystem
Server Companion App
Conduit App
Ecosystem
Server Companion App
Conduit App
Ecosystem
Server Companion App
Conduit App
Ecosystem
Server Companion App
Conduit App
Companion Apps
Modifying passes
PKPassLibrary PKPass
passLibrary = [[PKPassLibrary alloc] init]; passes = [passLibrary passes]; noteCenter = [NSNotificationCenter defaultCenter]; [noteCenter addObserver:self selector:@selector(passLibraryDidChange) name:PKPassLibraryDidChangeNotification object:passLibrary];
Entitlements
An app must declare the passes it accesses
Modifying a Pass
Modifying a Pass
PKPass isnt mutable
Your Server
Modifying a Pass
PKPass isnt mutable
Modifying a Pass
PKPass isnt mutable
Modifying a Pass
Identifying a pass to your server
Modifying a Pass
Incorporating a change
Demo
Using PassKit
Eliza Block
Ecosystem
Server Companion App
Conduit App
Ecosystem
Server Companion App
Conduit App
icon
organizationName
[passLibrary containsPass:aPass]
[PKPassLibrary isPassLibraryAvailable]
PassKit
PassKit
Add
PKAddPasses ViewController PKPass PKPassLibrary
Ecosystem
Server Companion App
Conduit App
Ecosystem
Server Companion App
Conduit App
Web Services
How to opt in
pass.json: { ... webServiceURL : https://www.foo.com/passes/, ... authenticationToken : PZ8GL23T24JEB41X6U, ... }
Web Services
Overview
Apple Push Notification Service
Your Server
Web Services
Overview
Apple Push Notification Service
Register
Your Server
Web Services
Overview
Apple Push Notification Service
Register
Your Server
Web Services
Overview
Apple Push Notification Service
Register
Your Server
Web Services
Overview
Apple Push Notification Service
Register
Web Services
Overview
Apple Push Notification Service
Register
Web Services
Overview
Apple Push Notification Service
Register
What serial numbers changed? 8ZA4P2 and 4GR3K9 Your Server Give me 8ZA4P2
Give me 4GR3K9
Web Services
Overview
Apple Push Notification Service
Register
What serial numbers changed? 8ZA4P2 and 4GR3K9 Your Server Give me 8ZA4P2 .pkpass data Give me 4GR3K9 .pkpass data
Web Services
Communication elements
Web Services
Communication elements
From pass.json
PassTypeID SerialNo. AuthToken
Web Services
Communication elements
From pass.json
PassTypeID SerialNo. AuthToken
From device
DeviceID PushToken
Web Services
Communication elements
From pass.json
PassTypeID SerialNo. AuthToken
From device
DeviceID PushToken
Web Services
Registration
Your Server
Web Services
Registration
DeviceID
PushToken
Web Services
Registration
Your Server
DeviceID
PushToken
PassTypeID
SerialNo.
AuthToken
Web Services
Registration
Your Server
DeviceID
PushToken
PassTypeID
SerialNo.
AuthToken
Web Services
Registration
Your Server
Web Services
Registration
Your Server
DeviceID
PushToken
PassTypeID
SerialNo.
Web Services
Storage on your server
Devices
Your Server
DeviceID
PushToken
PassTypeID
SerialNo.
Web Services
Storage on your server
Devices
Your Server
DeviceID
PushToken
PassTypeID
SerialNo.
Web Services
Storage on your server
Devices Device A Device B Your Server PushToken A PushToken B
DeviceID
PushToken
PassTypeID
SerialNo.
Web Services
Storage on your server
Devices Device A Device B Your Server DeviceID PushToken A PushToken B PushToken
PassTypeID
SerialNo.
Web Services
Storage on your server
Devices Device A Device B Your Server DeviceID PushToken A PushToken B PushToken
PassTypeID
SerialNo.
Web Services
Storage on your server
Devices Device A Device B DeviceID PushToken A PushToken B PushToken Registrations Device A Device A Device B pass.oceanic pass.oceanic pass.oceanic JA38 EK91 XD28
erver
PassTypeID
SerialNo.
Web Services
Storage on your server
Devices Device A Device B DeviceID PushToken A PushToken B PushToken Registrations Device A Device A Device B pass.oceanic pass.oceanic pass.oceanic JA38 EK91 XD28
PassTypeID
SerialNo.
Web Services
Storage on your server
Devices Device A Device B DeviceID PushToken A PushToken B PushToken Registrations Device A Device A Device B DeviceID pass.oceanic pass.oceanic pass.oceanic JA38 EK91 XD28
PassTypeID
SerialNo.
Web Services
Storage on your server
Devices Device A Device B DeviceID PushToken A PushToken B PushToken Registrations Device A Device A Device B DeviceID pass.oceanic pass.oceanic pass.oceanic PassTypeID JA38 EK91 XD28 SerialNo.
Web Services
Registration endpoint
Web Services
Registration endpoint
POST
/v1/devices/<deviceID>/registrations/<passTypeID>/<serialNo.>
Web Services
Registration endpoint
POST
/v1/devices/<deviceID>/registrations/<passTypeID>/<serialNo.>
Web Services
Registration endpoint
POST
/v1/devices/<deviceID>/registrations/<passTypeID>/<serialNo.>
JSON payload
{ pushToken : <pushToken> }
Web Services
Unregistration endpoint
Web Services
Unregistration endpoint
DELETE
/v1/devices/<deviceID>/registrations/<passTypeID>/<serialNo.>
Web Services
Unregistration endpoint
DELETE
/v1/devices/<deviceID>/registrations/<passTypeID>/<serialNo.>
Web Services
Storage on your server
Devices Device A Device B Device C PushToken A PushToken B PushToken C Registrations Device A Device A Device A Device B Device C pass.oceanic pass.oceanic pass.oceanic pass.oceanic pass.oceanic JA38 EK91 CL55 XD28 JA38
Bo
Web Services
Storage on your server
Boarding Passes JA38 EK91 XD28 CL55
Web Services
Storage on your server
Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD PER SYD LAX LAX 19C 6F 22D 20G ... ... ... ...
Web Services
Storage on your server
Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD PER SYD LAX LAX 19C 6F 22D 20G ... ... ... ...
Web Services
Storage on your server
Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD PER SYD LAX LAX 19C 6F 22D 20G ... ... ... ... 9/12, 10am 9/12, 10am 8/22, 6pm 9/1, 8pm Last Updated
Web Services
Handling a change
Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD PER SYD LAX LAX 19C 6F 22D 20G ... ... ... ... 9/12, 10am 9/12, 10am 8/22, 6pm 9/1, 8pm
Web Services
Handling a change
Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD PER SYD LAX LAX 19C 6F 22D 20G ... ... ... ... 9/12, 10am 9/12, 10am 8/22, 6pm 9/1, 8pm
Web Services
Handling a change
Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD PER SYD LAX LAX 3A 19C 6F 22D 20G ... ... ... ... 9/12, 10am 9/12, 10am 8/22, 6pm 9/1, 8pm
Web Services
Handling a change
Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD PER SYD LAX LAX 3A 19C 6F 22D 20G ... ... ... ... 9/12, 9/18,10am 5pm 9/12, 10am 8/22, 6pm 9/1, 8pm
Web Services
Handling a change
Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD PER SYD LAX LAX 3A 6F 22D 20G ... ... ... ... 9/18, 9/1, 8pm 5pm 9/12, 10am 8/22, 6pm 9/1, 8pm
Web Services
Handling a change
Registrations Device A Device A Device A Device B Device C pass.oceanic pass.oceanic pass.oceanic pass.oceanic pass.oceanic JA38 EK91 CL55 XD28 JA38 Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD
nA
nB
nC
Web Services
Handling a change
Registrations Device A Device A Device A Device B Device C pass.oceanic pass.oceanic pass.oceanic pass.oceanic pass.oceanic JA38 EK91 CL55 XD28 JA38 Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD
nA
nB
nC
Web Services
Handling a change
Registrations Device A Device A Device A Device B Device C pass.oceanic pass.oceanic pass.oceanic pass.oceanic pass.oceanic JA38 EK91 CL55 XD28 JA38 Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD
nA
nB
nC
Web Services
Handling a change
Devices Device A Device B Device C PushToken A PushToken B PushToken C Registrations Device A Device A Device A Device B Device C pass.oceanic pass.oceanic pass.oceanic pass.oceanic pass.oceanic JA38 EK91 CL55 XD28 JA38 Boarding Passes JA38 EK91 XD28 CL55
Hugo Reye
Hugo Reye
Jack Shepha
Hugo Reye
Web Services
Handling a change
Devices Device A Device B Device C PushToken A PushToken B PushToken C Registrations Device A Device A Device A Device B Device C pass.oceanic pass.oceanic pass.oceanic pass.oceanic pass.oceanic JA38 EK91 CL55 XD28 JA38 Boarding Passes JA38 EK91 XD28 CL55
Hugo Reye
Hugo Reye
Jack Shepha
Hugo Reye
Web Services
Sending a push notification
Devices Device A Device B Device C PushToken A PushToken B PushToken C Registrations Device A Device A Device A Device B Device C pass.oceanic pass.oceanic pass.oceanic pass.oceanic pass.oceanic JA38 EK91 CL55 XD28 JA38 Boarding Passes JA38 EK91 XD28 CL55
Hugo Reye
Hugo Reye
Jack Shepha
Hugo Reye
Web Services
Sending a push notification
Devices pass.oceanic Device ... A 3A pass.oceanic Device ... B 6F JA38 PushToken 9/12, 10amA EK91 PushToken 9/12, 10am B
pass.oceanic CL55 Device ... C Your PushToken Server 22D 8/22, 6pm C pass.oceanic 20G ... pass.oceanic XD28 9/1, 8pm JA38
Web Services
Sending a push notification
Your Server
Web Services
Sending a push notification
Web Services
Sending a push notification
PassTypeID
Web Services
What changed?
PassTypeID
Web Services
What changed?
Registrations Device A Device A Device A Device B Device C PassTypeID pass.oceanic pass.oceanic pass.oceanic pass.oceanic pass.oceanic
Web Services
What changed?
Registrations Device A What serial numbers changed? Device A pass.oceanic pass.oceanic
Web Services
What changed?
Registrations Device A What serial numbers changed? DeviceID Device A pass.oceanic pass.oceanic
Web Services
What changed?
Registrations Device A What serial numbers changed? DeviceID PassTypeID Device A pass.oceanic pass.oceanic
Web Services
What changed?
Registrations Device A What serial numbers changed? DeviceID PassTypeID UpdateTag Device A pass.oceanic pass.oceanic
Web Services
What changed?
Registrations Device A What serial numbers changed? DeviceID PassTypeID UpdateTag Device A pass.oceanic pass.oceanic
Web Services
What changed?
Registrations Device A What serial numbers changed? DeviceID PassTypeID UpdateTag Device A pass.oceanic pass.oceanic
Web Services
What changed?
Registrations Device A What serial numbers changed? DeviceID Device A PassTypeID pass.oceanic UpdateTag 9/12, 10am Device A pass.oceanic pass.oceanic
UpdateTag
SerialNo.
Device C
Web Services
Figuring out what changed
Registrations Device A Device A Device A Device B Device C pass.oceanic pass.oceanic pass.oceanic pass.oceanic pass.oceanic JA38 EK91 CL55 XD28 JA38
Web Services
Figuring out what changed
Registrations Device A Device A Device A Device B Device C pass.oceanic pass.oceanic pass.oceanic pass.oceanic pass.oceanic JA38 EK91 CL55 XD28 JA38
Web Services
Figuring out what changed
Registrations Device A Device A Device A Device B Device C pass.oceanic pass.oceanic pass.oceanic pass.oceanic pass.oceanic JA38 EK91 CL55 XD28 JA38
Web Services
Figuring out what changed
Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD PER SYD LAX LAX 3A 6F 22D 20G ... ... ... ... 9/18, 5pm 9/12, 10am 8/22, 6pm 9/1, 8pm
Web Services
Figuring out what changed
Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD PER SYD LAX LAX 3A 6F 22D 20G ... ... ... ... 9/18, 5pm 9/12, 10am 8/22, 6pm 9/1, 8pm
Web Services
Figuring out what changed
Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD PER SYD LAX LAX 3A 6F 22D 20G ... ... ... ... 9/18, 5pm 9/12, 10am 8/22, 6pm 9/1, 8pm
Web Services
Figuring out what changed
Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD PER SYD LAX LAX 3A 6F 22D 20G ... ... ... ... 9/18, 5pm 9/12, 10am 8/22, 6pm 9/1, 8pm
Web Services
Figuring out what changed
Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD PER SYD LAX LAX 3A 6F 22D 20G ... ... ... ... 9/18, 5pm 9/12, 10am 8/22, 6pm 9/1, 8pm
JA38
Web Services
Figuring out what changed
Boarding Passes JA38 EK91 XD28 CL55 Hugo Reyes Hugo Reyes Jack Shephard Hugo Reyes 9/18, 7pm 9/21, 9am 9/22, 3pm 9/22, 3pm OA177 OA26 OA815 OA815 SYD PER SYD SYD PER SYD LAX LAX 3A 6F 22D 20G ... ... ... ... 9/18, 5pm 9/12, 10am 8/22, 6pm 9/1, 8pm
Web Services
What changed?
What serial numbers changed? DeviceID Device A PassTypeID pass.oceanic UpdateTag 9/12, 10am Your Server
Web Services
What changed?
What serial numbers changed? DeviceID Device A PassTypeID pass.oceanic UpdateTag 9/12, 10am Your Server
UpdateTag
Web Services
What changed?
What serial numbers changed? DeviceID Device A PassTypeID pass.oceanic UpdateTag 9/12, 10am Your Server
SerialNo. JA38
Web Services
What changed? endpoint
Web Services
What changed? endpoint
GET
/v1/devices/<deviceID>/registrations/<passTypeID>
Web Services
What changed? endpoint
GET
/v1/devices/<deviceID>/registrations/<passTypeID>?passesUpdatedSince=<tag>
Web Services
What changed? endpoint
GET
/v1/devices/<deviceID>/registrations/<passTypeID>?passesUpdatedSince=<tag>
Web Services
What changed? endpoint
GET
/v1/devices/<deviceID>/registrations/<passTypeID>?passesUpdatedSince=<tag>
Web Services
What changed? endpoint
GET
/v1/devices/<deviceID>/registrations/<passTypeID>?passesUpdatedSince=<tag>
Web Services
passesUpdatedSince vs. if-modified-since
Web Services
passesUpdatedSince vs. if-modified-since
Web Services
passesUpdatedSince vs. if-modified-since
Web Services
passesUpdatedSince vs. if-modified-since
Web Services
passesUpdatedSince vs. if-modified-since
Web Services
Getting up-to-date pass
Your Server
Web Services
Getting up-to-date pass
Web Services
Getting up-to-date pass
.pkpass
Web Services
Get pass endpoint
Web Services
Get pass endpoint
GET
/v1/passes/<passTypeID>/<serialNo.>
Web Services
Get pass endpoint
GET
/v1/passes/<passTypeID>/<serialNo.>
Web Services
Get pass endpoint
GET
/v1/passes/<passTypeID>/<serialNo.>
Web Services
Get pass endpoint
GET
/v1/passes/<passTypeID>/<serialNo.>
Web Services
Get pass endpoint
GET
/v1/passes/<passTypeID>/<serialNo.>
Web Services
Get pass endpoint
GET
/v1/passes/<passTypeID>/<serialNo.>
Server responds with signed, zipped .pkpass data or 304 In the response header
Last-modified: <timestamp>
Web Services
Pass signing algorithm
Web Services
Pass signing algorithm
Web Services
Pass signing algorithm
Web Services
Pass signing algorithm
Web Services
Pass signing algorithm
Sign the manifest data with your cert; save the result as signature
Web Services
Pass signing algorithm
Sign the manifest data with your cert; save the result as signature Zip the contents of the pass directory
Demo
Running the sample web service implementation
Ken Ferry
Web Services
Rules of the road
Web Services
Rules of the road
Web Services
Rules of the road
Web Services
Rules of the road
Web Services
Rules of the road
Web Services
Rules of the road
Web Services
Rules of the road
Web Services
Enforcement and feedback
Web Services
Enforcement and feedback
Web Services
Enforcement and feedback
Web Services
Enforcement and feedback
Web Services
Enforcement and feedback
If APNS bounces messages to a device, clear it from your database Additional log endpoint
Web Services
Enforcement and feedback
If APNS bounces messages to a device, clear it from your database Additional log endpoint
POST /v1/log
Web Services
Enforcement and feedback
If APNS bounces messages to a device, clear it from your database Additional log endpoint
POST /v1/log
Web Services
Enforcement and feedback
If APNS bounces messages to a device, clear it from your database Additional log endpoint
POST /v1/log
We may rate-limit your updates or tell APNS to stop delivering your pushes altogether
Web Services
Enforcement and feedback
If APNS bounces messages to a device, clear it from your database Additional log endpoint
POST /v1/log
We may rate-limit your updates or tell APNS to stop delivering your pushes altogether Angry phone call
Summing Up
PassKit
PKPass PKPassLibrary PKAddPassesViewController
More Information
Paul Marcos
Application Services Evangelist pmarcos@apple.com
Documentation
Pass Kit Programming Guide http://developer.apple.com
Related Sessions
Introducing Passbook, Part 1
Presidio Wednesday 11:30AM
Labs
Passbook Lab
App Services Lab B Friday 9:00AM