How iOS 7 Handles Push Differently

Everyone at Urban Airship has been excited about the launch of iOS 7 and its new features like Background Push. Many apps that use Urban Airship are seeing iOS 7 adoption of more than 70%.

As adoption grows it is important to take stock of changes to the iOS push ecosystem related to how notifications are processed. The changes do not affect end-user experience, but from a technical standpoint, we find them interesting and consider it useful to shed some light on them. All push systems work by having the mobile operating system (iOS in this case) issue an address which app publishers use to specify the delivery of the notification to the device. Apple calls this the device token.

A device token is a big long random set of letters and numbers which when paired with the right formatting and security credentials, provides the required authentication for Apple to deliver a push message to the intended app. Nothing has changed in the way messages are delivered, but Apple did change two things about the way they issue device tokens.

  1. Prior to iOS 7, the device token was the same across all app installations on a given device. Different apps on your phone, whether Tap Tap Revenge or USA Today, would utilize the same address, i.e., device token, to route the push notification to you. The security credentials that you pair with a message would ensure it made it to the right app. On iOS 7, Apple has gone one step further and made sure that device tokens are now different in every single app install. This helps further protect users’ privacy by removing another phone-level identifier.
  2. iOS 7 no longer provides a device token when a user declines to enable push notifications for a given app, or if they turn it off at some point within the Settings app. This is actually a return to how push worked in iOS 4 and earlier, but iOS 5 & 6 were unique in that they always issued a device token even if the user said no to push. Again, this is a win for user privacy, as no identifier will be present if they didn’t opt for the service.

Apple neatly handles all the device token upgrade scenarios related to this change. They map the tokens from iOS 6 (or earlier) to new tokens as they are generated upon app open in an iOS 7 world. Once an app publisher sends a message to the new token, the mapping is dropped. The Apple feedback service closes the loop by keeping invalid tokens out of the system. That was a mouthful! The good news? Urban Airship handles all of this for you automatically. There have been no interruptions to messaging services because we seamlessly clean up the old tokens for you. This can be particularly tricky given that there are a complex set of upgrade scenarios that can affect push:

  • iOS 7 upgrade on the same device from a prior iOS
  • iOS 7 along with a new device; no restore
  • iOS 7 along with a new device with iCloud restore
  • iOS 7 along with a new device with local restore (encrypted & unencrypted variations)
  • Upgrade prior device to iOS 7, use for a while, then switch to a new nevice upgrade scenario with a restore

The above scenarios are in addition to the regular things that everyday iOS users do that can trigger a change in the presence or status of a device token, such as:

  • Reset of device settings
  • Restore of a device to an image with different settings
  • Opt out or change of Notifications
  • Delete an app

Each mobile OS is unique, and changes like these are not uncommon. We spend a lot of time thinking through all the possible ways that changes to an OS or delivery platform can impact our customers and their app users, and work hard to shield them from the nitty gritty details. Not everyone needs to care as deeply about the specifics of device tokens as we do—and our job is to worry about these things so that our customers can focus on delivering compelling engagements to their app users. We weren’t completely immune to these changes and we’ve found a few areas where complex audience segments behave differently for Rich App Pages. Additionally for certain customers of ours, token counts appear inflated because of all the churn that is occurring for this identifier.

But fear not; we’re actively deploying fixes and in all likelihood very few customers will take notice of these back-end changes. If you do, please don’t hesitate to contact us at support@urbanairship.com. We hope that this peek under the hood proves interesting to you. There are as many changes to the inner workings of iOS 7 as there are to the design. As Steve Jobs once said, “We try very hard to surprise and delight (our customers), and work our asses off doing it. But we have a blast doing it. What motivates us is for our users to love our products and connect them with great apps and content.” We couldn’t have said it better ourselves. As we learn more we’ll share and work with our customers on any questions they may have.