AWS News Blog

Amazon SNS – Now With Enhanced Support for iOS 8

Voiced by Polly

Amazon Simple Notification Service (Amazon SNS) is a fast, flexible, managed push service that makes it simple and cost-effective to push notifications to Apple, Google, Fire OS, and Windows devices, as well as Android devices in China with Baidu Cloud Push.

With yesterday’s launch of iOS 8, Apple has introduced new features that enable some rich new use cases for mobile push notifications — interactive push notifications, third party widgets, and larger (2 KB) payloads. With these new features, you can message and engage your customers even when your app is not currently active.

Today, we are pleased to announce support for the new mobile push capabilities announced with iOS 8. We are publishing a new iOS 8 Sample App that demonstrates how these new features can be implemented with SNS, and have also implemented support for larger 2KB payloads.

Interactive Push Notifications and Widgets
The new iOS 8 Interactive Push Notifications lets apps present custom options in the push banner. These custom options allow users to interact with the app without moving it to the foreground, resulting in a less intrusive and more fluid experience.

Widgets are miniature versions of your mobile app that users can dock to the Notifications Center. Interactive notifications and widgets are great for quick extensions to your core app that extend the experience throughout the day.

Both interactive push notifications and widgets can be implemented by adding additional parameters to your push notifications. You can use SNS platform-specific payloads to specify those additional parameters for your iOS customers.

Suppose you have the following message payload (yes, this is JSON within JSON):


{"APNS":"{\"aps\":{\"alert\":\"MESSAGE\",\"category\":\"MESSAGE_CATEGORY\"} }"}

Your iOS app can set up a notification category using the following code:


UIMutableUserNotificationCategory *messageCategory = [[UIMutableUserNotificationCategory alloc] init];
messageCategory.identifier = @"MESSAGE_CATEGORY";

[messageCategory setActions:@[readAction, ignoreAction, deleteAction]
  forContext:UIUserNotificationActionContextDefault];

Larger (2 KB) Payloads
In the past, the Apple Push Notification service (APNs) would only accept up to 256 bytes. As of yesterday’s launch, APNs can now accept payloads as large as 2 KB. This change was introduced along with iOS 8, but 2 KB payloads will also work for devices running older versions of iOS. You can use the larger payloads to deliver richer messages and instructions to your app, which is particularly useful for silent notifications that get delivered to your app in the background. SNS also supports 2 KB APNs payloads beginning today.

Ready Now
Our customers tell us that one major benefit of SNS is they no longer have to keep up with changes to the APIs of each messaging platform. These SNS enhancements introduced today are an example of new features that become quickly available to our customers without added server-side development.

To learn more about getting started with SNS Mobile Push, and to download our new iOS 8 sample app (which includes the full version of the code example mentioned above), simply click here.

Jeff;

Modified 2/11/2021 – In an effort to ensure a great experience, expired links in this post have been updated or removed from the original post.