![Page 1: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/1.jpg)
© 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.
System Frameworks #WWDC16
Session 724
What’s New in Apple Push Notification Service
Mayur Mahajan Apple Push Notification Service Engineer
![Page 2: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/2.jpg)
Review
HTTP/2 provider APIInstant feedbackLarger payloadSimplified certificate handling
![Page 3: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/3.jpg)
Sending notificationsHTTP/2 Provider API
APNs Provider
Client App
![Page 4: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/4.jpg)
Sending notificationsHTTP/2 Provider API
APNs Provider
Client App
![Page 5: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/5.jpg)
Sending notificationsHTTP/2 Provider API
APNs Provider
Client App
![Page 6: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/6.jpg)
Sending notificationsHTTP/2 Provider API
APNs Provider
Client App
![Page 7: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/7.jpg)
Sending notificationsHTTP/2 Provider API
APNs Provider
Client App
![Page 8: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/8.jpg)
Sending notificationsHTTP/2 Provider API
APNs Provider
Client App
HTTP/2 request
![Page 9: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/9.jpg)
Sending notificationsHTTP/2 Provider API
APNs Provider
Client App
HTTP/2 request
HTTP/2 request
![Page 10: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/10.jpg)
Simplified Certificate Handling
Application pushVoIP pushComplication pushDevelopment and production environment
![Page 11: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/11.jpg)
Token Authentication
NEW
![Page 12: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/12.jpg)
Token Authentication
![Page 13: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/13.jpg)
Token Authentication
Simplified provider authentication when connecting to APNsSecureEasy to generateNo more expired certificates!
![Page 14: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/14.jpg)
Connecting to APNs with client certificateCertificate Authentication
AccountAPNs Provider
![Page 15: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/15.jpg)
Connecting to APNs with client certificateCertificate Authentication
AccountAPNs Provider
![Page 16: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/16.jpg)
Connecting to APNs with client certificateCertificate Authentication
Account
TLS
APNs Provider
![Page 17: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/17.jpg)
Connecting to APNs with client certificateCertificate Authentication
Account
TLS
APNs Provider
![Page 18: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/18.jpg)
Connecting to APNS with Token AuthenticationToken Authentication
AccountAPNs Provider
![Page 19: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/19.jpg)
Connecting to APNS with Token AuthenticationToken Authentication
AccountAPNs Provider
![Page 20: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/20.jpg)
Connecting to APNS with Token AuthenticationToken Authentication
Account
TLS
APNs Provider
![Page 21: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/21.jpg)
Connecting to APNS with Token AuthenticationToken Authentication
Account
TLS
APNs Provider
![Page 22: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/22.jpg)
Connecting to APNS with Token AuthenticationToken Authentication
Account
TLS
APNs Provider
![Page 23: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/23.jpg)
Token Authentication
TLS
APNs Provider
![Page 24: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/24.jpg)
Token Authentication
TLS
APNs Provider
Request with token
![Page 25: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/25.jpg)
Token Authentication
TLS
APNs Provider
![Page 26: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/26.jpg)
Token Authentication
TLS
APNs Provider
Response
![Page 27: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/27.jpg)
DetailsToken Authentication
Provision signing key via Developer Account
![Page 28: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/28.jpg)
DetailsToken Authentication
Provision signing key via Developer Account
![Page 29: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/29.jpg)
DetailsToken Authentication
Provision signing key via Developer AccountConstruct the token Sign token using ES256 (ECDSA using P256 curve, SHA256 hash)
![Page 30: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/30.jpg)
// Token Authentication
// JSON Web Tokens
eyJhbGciOiJFUzI1NiIsImtpZCI6IkFCQ0RFRkdISUoifQ.eyJpc3MiOiIxMjM0NTY3ODkwIiwiaWF0Ijoi
MTQ2Mzk3NTIzMyJ9.aBup1REyXE9Po8ekWJ3ifUly67NlPyTlcgfSwy...
Header
{
"alg": "ES256",
"kid": "ABCDEFGHIJ"
}
Claims
{
"iss": “QRSTUVWXYZ”,
"iat": "1463975233"
}
Signature
![Page 31: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/31.jpg)
// Token Authentication
// JSON Web Tokens
eyJhbGciOiJFUzI1NiIsImtpZCI6IkFCQ0RFRkdISUoifQ.eyJpc3MiOiIxMjM0NTY3ODkwIiwiaWF0Ijoi
MTQ2Mzk3NTIzMyJ9.aBup1REyXE9Po8ekWJ3ifUly67NlPyTlcgfSwy...
Header
{
"alg": "ES256",
"kid": "ABCDEFGHIJ"
}
Claims
{
"iss": “QRSTUVWXYZ”,
"iat": "1463975233"
}
Signature
![Page 32: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/32.jpg)
// Token Authentication
// JSON Web Tokens
eyJhbGciOiJFUzI1NiIsImtpZCI6IkFCQ0RFRkdISUoifQ.eyJpc3MiOiIxMjM0NTY3ODkwIiwiaWF0Ijoi
MTQ2Mzk3NTIzMyJ9.aBup1REyXE9Po8ekWJ3ifUly67NlPyTlcgfSwy...
Header
{
"alg": "ES256",
"kid": "ABCDEFGHIJ"
}
Claims
{
"iss": “QRSTUVWXYZ”,
"iat": "1463975233"
}
Signature
![Page 33: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/33.jpg)
// Token Authentication
// JSON Web Tokens
eyJhbGciOiJFUzI1NiIsImtpZCI6IkFCQ0RFRkdISUoifQ.eyJpc3MiOiIxMjM0NTY3ODkwIiwiaWF0Ijoi
MTQ2Mzk3NTIzMyJ9.aBup1REyXE9Po8ekWJ3ifUly67NlPyTlcgfSwy...
Header
{
"alg": "ES256",
"kid": "ABCDEFGHIJ"
}
Claims
{
"iss": “QRSTUVWXYZ”,
"iat": "1463975233"
}
Signature
![Page 34: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/34.jpg)
// Token Authentication
// JSON Web Tokens
eyJhbGciOiJFUzI1NiIsImtpZCI6IkFCQ0RFRkdISUoifQ.eyJpc3MiOiIxMjM0NTY3ODkwIiwiaWF0Ijoi
MTQ2Mzk3NTIzMyJ9.aBup1REyXE9Po8ekWJ3ifUly67NlPyTlcgfSwy...
Header
{
"alg": "ES256",
"kid": "ABCDEFGHIJ"
}
Claims
{
"iss": “QRSTUVWXYZ”,
"iat": "1463975233"
}
Signature
![Page 35: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/35.jpg)
// Token Authentication
// JSON Web Tokens
eyJhbGciOiJFUzI1NiIsImtpZCI6IkFCQ0RFRkdISUoifQ.eyJpc3MiOiIxMjM0NTY3ODkwIiwiaWF0Ijoi
MTQ2Mzk3NTIzMyJ9.aBup1REyXE9Po8ekWJ3ifUly67NlPyTlcgfSwy...
Header
{
"alg": "ES256",
"kid": "ABCDEFGHIJ"
}
Claims
{
"iss": “QRSTUVWXYZ”,
"iat": "1463975233"
}
Signature
![Page 36: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/36.jpg)
// Token Authentication
// JSON Web Tokens
eyJhbGciOiJFUzI1NiIsImtpZCI6IkFCQ0RFRkdISUoifQ.eyJpc3MiOiIxMjM0NTY3ODkwIiwiaWF0Ijoi
MTQ2Mzk3NTIzMyJ9.aBup1REyXE9Po8ekWJ3ifUly67NlPyTlcgfSwy...
Header
{
"alg": "ES256",
"kid": "ABCDEFGHIJ"
}
Claims
{
"iss": “QRSTUVWXYZ”,
"iat": "1463975233"
}
Signature
![Page 37: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/37.jpg)
// Token Authentication
// Request example
HEADERS
- END_STREAM
+ END_HEADERS
:authority = api.push.apple.com
:method = POST
:path = /3/device/ad2bcd38f6773cdad050411...
authorization = bearer eyJhbGciOiJFUzI1N...
apns-topic = com.foo.tokenauth
DATA
+ END_STREAM
{ "aps" : { "alert" : "Hello Token Authentication" } }
![Page 38: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/38.jpg)
// Token Authentication
// Request example
HEADERS
- END_STREAM
+ END_HEADERS
:authority = api.push.apple.com
:method = POST
:path = /3/device/ad2bcd38f6773cdad050411...
authorization = bearer eyJhbGciOiJFUzI1N...
apns-topic = com.foo.tokenauth
DATA
+ END_STREAM
{ "aps" : { "alert" : "Hello Token Authentication" } }
![Page 39: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/39.jpg)
// Token Authentication
// Response example
HEADERS
+ END_STREAM
+ END_HEADERS
:status = 200
![Page 40: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/40.jpg)
// Token Authentication
// Response example
HEADERS
- END_STREAM
+ END_HEADERS
:status = 403
content-type = application/json
DATA
+ END_STREAM
{ "reason": "InvalidProviderToken" }
![Page 41: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/41.jpg)
// Token Authentication
// Response example
HEADERS
- END_STREAM
+ END_HEADERS
:status = 403
content-type = application/json
DATA
+ END_STREAM
{ "reason": "ExpiredProviderToken" }
![Page 42: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/42.jpg)
DetailsToken Authentication
Signed tokens need to be generated periodicallySigning key does not expireSigning key can be revoked through your Account
![Page 43: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/43.jpg)
Coming later this year…
![Page 44: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/44.jpg)
More Information
https://developer.apple.com/wwdc16/724
![Page 45: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/45.jpg)
Related Sessions
Introduction to Notifications Pacific Heights Wednesday 9:00AM
Advanced Notifications Pacific Heights Wednesday 10:00AM
![Page 46: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/46.jpg)
Labs
Notifications Lab Frameworks Lab C Wednesday 11:00AM
Notifications Lab Graphics, Games & Media Lab B Friday 9:00AM
![Page 47: What’s New in Apple Push Notification Service › videos › wwdc › 2016 › 724x... · 2016-07-09 · Review HTTP/2 provider API Instant feedback Larger payload Simplified](https://reader034.vdocuments.net/reader034/viewer/2022042411/5f28e8250a3157346e7b031d/html5/thumbnails/47.jpg)