New notifications for iOS 10, tvOS and watchOS developers

New notifications for iOS 10, tvOS and watchOS developers

Apple has released changes to push notifications for some of its key products (iPhone, iPad, Apple Watch and Apple TV). These changes include rich content (images, GIFs, videos and sounds), actions and advantages with 3D Touch.

04 Jan. 2017

The latest iOS version contains some interesting alterations for the teams that conceptualize and develop products. Among its new features, iOS 10 includes push notifications with a different look and feel and clear advantages such as rich content and changes to the provider's protocol. In the words of Apple itself, "push notifications are great for keeping users informed with timely and relevant content, whether your app is running in the background or inactive." They are a very interesting resource.  

In the case of iOS, the first major benefit is that these alterations do not only impact the iOS 10 operating system (smartphones and tablets), they also affect tvOS (Apple TV, the multimedia digital receptor that plays content from iTunes, YouTube, Vimeo, Netflix, etc. ) and watchOS 3 (the operating system of Apple's smart watch, Apple Watch). Consequently, this means that the changes involve all of Apple's products.

Firstly, we need to distinguish between the two types of push notifications included in the latest versions of Apple's operating systems:

  • Remote push notifications: Usually sent over media apps, social networks (e.g. Twitter and Facebook) and instant messaging services (e.g. WhatsApp and Telegram). These notifications are sent from these applications to the Apple Push Notification (APNs) service. They are sent as follows:

  • Local notifications: With this type of notification, the application itself set ups the alert's details locally and sends the information to the system; the system then sends the notification when the application is not on the foreground. As it happens with remote notifications, these notifications are compatible with iOS, tvOS and watchOS. 

The main changes introduced by Apple in this service:

  1. Notifications with rich content.

The changes made by Apple allow app developers to send users all sorts of content via push notifications: text (it was already common) but also images (in GIF animated format), videos and audio. These are called rich content notifications. The goal is to try to add some advantages that may increase the opening rates of alerts sent to mobile devices, mostly in sectors such as media.

Push notifications also include class UNMutableNotificationContent, which contains the data associated with push notifications. In this case, programmers can, for example, associate elements such as sound, with variable var UNNotificationSound. Naturally, this class must be associated with an object UNNotificactionRequest. To integrate an added element into the notification, developers must use variable var UNNotificationAttachment, with statement: var attachments: [UNNotificationAttachment] { get set }. This makes it possible to include images, GIFs and videos in push alerts in iOS 10.

2. Actions associated with push notifications.

Apple's new push notifications can be associated with a series of actions for the user to make decisions about the alert in question. Obviously, these actions will be selected by the application's product and development team. In short, this is an option that iOS and watchOS programmers can use to facilitate user customization. For example, users may reply to the message through an instant messaging application within the push notification on their phone.

Programmers can assign customized actions to each type of notification that is compatible with the application (defined using class UNNotificationCategory). The purpose is to have all necessary information for displaying the task as expected. This is done through an identifier, a unique string used to identify an action: When the user selects it, the system sends this string to the app through the object UNNotificationResponse and requests that the task be carried. The statement is:

convenience init(identifier: String,
          title: String,
        options: UNNotificationActionOptions = [])

3. Impact of 3D Touch on push notifications.

3D Touch has been part of Apple's releases since iPhone 6S and 6S Plus. This technology was a major development and, naturally, it has interesting effects from version 10 of Apple's operating system onward. 3D Touch allows users to carry out actions that, in principle, are not visible by applying slightly more pressure on the device's screen. To some extent, this is a feature for deploying quick access.

In the specific case of notifications, 3D Touch enables direct user interaction with alerts without having to load the application from the background or when the app is inactive. Users are able to reply to a message directly from WhatsApp, or to an email from Gmail. It is compatible with some of the key system applications: FaceTime, Calendar and Messages. It is also possible, for instance, to quickly delete all notifications from the device at the same time by repeatedly pressing the X icon (delete) at the top

Discover BBVA's API Notifications

Are you interested in other financial APIs? Discover all the APIs we can offer you at BBVA

Sign up!

Sign up to the BBVAOPEN4U newsletter and receive tips, tools and the most innovative events directly in your inbox.