WNS Migration Guide

Beginning with Windows Phone 8.1, Microsoft supports push notifications for mobile apps via WNS, the notification service previously available only for desktop applications.

According to Microsoft:

“The Windows Notification Service (WNS), and its associated APIs, represents the common push notification service platform being used by all Windows Phone Store apps today, and in the future”.

(Choosing MPNS or WNS for a Windows Phone Silverlight 8.1 app, Windows Dev Center)

WNS is easier to use, supports a more modern feature set, and supports universal applications targeting both desktop and mobile devices.

Given Microsoft’s decision to support only WNS for Windows Phone Store apps now and in the future, we strongly recommend migrating from MPNS to WNS for all apps as support for MPNS is not likely to remain indefinitely.

This topic guide will cover the process necessary to update a legacy app to take advantage of WNS.

Prerequisites

In order to use WNS, your app must target Windows Phone 8.1 or higher. If your app currently targets Windows Phone 8.0, you will need to update it accordingly.

For instructions on retargeting your app, see the instructions on retargeting to Windows Phone 8.1 on MSDN.

Now would also be a good time to review Microsoft’s overview of WNS and its various features, before diving in.

Setup

The Urban Airship SDK for Windows has an identical public API to the Windows Phone 8 library. This means that migrated apps will not require any source code changes as far as SDK usage is concerned. Instead, the major changes involve configuring your app to use the appropriate credentials.

First, you will need to set up your app in the Windows Store Dashboard, as explained by this article on WNS authentication.

Once this is complete, you will also need to update your service settings and credentials on the Urban Airship dashboard, as well as your application’s manifest entry in Visual Studio. For details on this process, see our Universal Library setup instructions.