DOCUMENTATION GET EARLY ACCESS Push notifications are a way for an app to send information to the user’s phone even when the app isn’t in use. From the user’s perspective this is an extremely valuable feature. It gets information delivered, and does it in near real time. From the developer’s perspective, however, using APNS (Apple Push Notification Service) can sometimes be a bit limiting and clumsy. And with the release of the iOS 7, developers can take advantage of the new push features, but will inevitably stumble upon new challenges. Here at Layer we're building the open communications layer for the Internet. Through a simple yet powerful SDK, Layer provides the building blocks for developers to add secure and reliable messaging, voice and video features to any app. Layer provides a globally-distributed, ultra-reliable infrastructure and handles the hard parts - sync, message states, push notifications and more - so that developers can focus on innovation and delighting their users. Because at Layer we deliver messages in real-time, even when the app is not active, it's important that we're able to take the advantage of APNS. Allow me to share my findings and how we tackled Apple’s Push Notifications in LayerKit. I'd like my data synced, and to go please First things first. What is LayerKit? It’s what we proudly call our iOS SDK here at Layer. Keeping data synced between the app and the server at all times (or at least as much as possible) is a non trivial task for an iOS developer. We like to think LayerKit is pretty good at it. Our approach uses a special synchronization procedure, which can be triggered internally (within the LayerKit client) or externally (by the server). So whenever there’s any kind of message-related activity (LayerKit receiving or sending messages, or updating their mutable fields) this synchronization procedure is at work. And boy, there’s a lot if it. We use a custom protocol (which we’ll discuss in a future article) for transferring synchronization data over a persistent TCP connection. Besides that, the protocol also enables receiving of special incoming commands from the server, which trigger the synchronization procedure inside the LayerKit at any time (for example, in response to an incoming message). How we leverage iOS push notifications Klemen Verdnik, December 19. 2013
9
Embed
Layer - Blog - How We Leverage IOS Push Notifications
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
DOCUMENTATION GET EARLY ACCESS
Push notifications are a way for an app to send information to the user’s phone even when the app isn’t
in use. From the user’s perspective this is an extremely valuable feature. It gets information delivered,
and does it in near real time. From the developer’s perspective, however, using APNS (Apple Push
Notification Service) can sometimes be a bit limiting and clumsy. And with the release of the iOS 7,
developers can take advantage of the new push features, but will inevitably stumble upon new
challenges.
Here at Layer we're building the open communications layer for the Internet. Through a simple yet
powerful SDK, Layer provides the building blocks for developers to add secure and reliable messaging,
voice and video features to any app. Layer provides a globally-distributed, ultra-reliable infrastructure
and handles the hard parts - sync, message states, push notifications and more - so that developers can
focus on innovation and delighting their users.
Because at Layer we deliver messages in real-time, even when the app is not active, it's important that
we're able to take the advantage of APNS. Allow me to share my findings and how we tackled Apple’s
Push Notifications in LayerKit.
I'd like my data synced, and to go please
First things first. What is LayerKit? It’s what we proudly call our iOS SDK here at Layer. Keeping data
synced between the app and the server at all times (or at least as much as possible) is a non trivial task
for an iOS developer. We like to think LayerKit is pretty good at it. Our approach uses a special
synchronization procedure, which can be triggered internally (within the LayerKit client) or externally (by
the server). So whenever there’s any kind of message-related activity (LayerKit receiving or sending
messages, or updating their mutable fields) this synchronization procedure is at work. And boy, there’s a
lot if it.
We use a custom protocol (which we’ll discuss in a future article) for transferring synchronization data
over a persistent TCP connection. Besides that, the protocol also enables receiving of special incoming
commands from the server, which trigger the synchronization procedure inside the LayerKit at any time
(for example, in response to an incoming message).
How we leverage iOS push notificationsKlemen Verdnik, December 19. 2013