OneSignal Help & Documentation

Welcome to the OneSignal New IA developer hub. You'll find comprehensive guides and documentation to help you start working with OneSignal New IA as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Discussions

Windows Phone SDK Setup

OneSignal Windows Phone 8.0 and 8.1 SDK Setup Guide.

For Developers

Required For Setup

Using an app framework?

If you're using an app framework to build your Windows Phone app, we have higher level SDKs for the following: Unity, PhoneGap, Cordova, Ionic, Intel XDK, and Marmalade.

Windows Phone 10

OneSignal does not support UWP projects yet. However Windows Phone 8.1 projects will run and support push notifications on both Window Phone 8.1 & 10 devices.


Setup SDK

Windows Phone 8.1

Generate Credentials

Before you start you must generate a Windows Phone Package SID and Secret

1. Add OneSignal to your Project

1.1 Download the OneSignal Windows Phone SDK.

1.2 Copy the Release/OneSignalSDK_WP81_Release folder into your project folder.

1.3 In Visual Studio, right click on References and go to "Add Reference...".

1.4 Browse for OneSignalSDK_WP_WNS.dll and press OK.

Silverlight Compatibility

The OneSignal SDK is currently not compatibility with Silverlight or Windows UWP (Windows Universal Platform) Projects.

2. Package.appxmanifest Settings

2.1 Double click on Package.appxmanifest then select the "Application" tab and scroll down to the "Notifications:" section. Change "Toast capable:" to Yes.

2.2 Under the Capabilities tab make sure "Internet (Client & Server)" is checked. Lastly make sure to save.

3. Add Code

3.1 Open App.xaml.cs under App.xaml and the following OneSignal.init code below to your OnLaunched method.

using OneSignalSDK_WP_WNS;

protected override void OnLaunched(LaunchActivatedEventArgs e) {
	OneSignal.Init("b2f7f966-d8cc-11e4-bed1-df8f05be55ba", e);
}

Repalce b2f7f966-d8cc-11e4-bed1-df8f05be55ba with your OneSignal App Id.

3.2 Optionally, you can add a notification opened callback that fires when a notification is opened. This callback also fires when a notification is received when your app is being used instead of displaying a notification.

protected override void OnLaunched(LaunchActivatedEventArgs e) {   
	OneSignal.Init("b2f7f966-d8cc-11e4-bed1-df8f05be55ba", e, notificationOpened);
}

private void notificationOpened(string message, IDictionary<string, string> additionalData, bool isActive) {
   System.Diagnostics.Debug.WriteLine("notificationOpened:message:" + message);
   System.Diagnostics.Debug.WriteLine("notificationOpened:additionalData:" + additionalData);
   System.Diagnostics.Debug.WriteLine("notificationOpened:isActive:" + isActive);
}

4. Associate App with the Store

Your app does not have to be published however, you must have it created on the Windows Dev Center. Follow our Windows Phone Project SID & Secret setup if you have not done this yet.

4.1 Right click on your VS project and select Store>Associate App with the Store...

4.2 Click Next and sign into your Microsoft account.

4.3 Select your app and press Next.

4.4. Lastly, press Associate.

Done! You should be all set to go with your Windows Phone 8.1 app.


Setup SDK (Windows Phone 8.0)

Windows Phone 8.0

1. Add our library

1.1 Download the OneSignal Windows Phone SDK.

1.2 Copy the Release/OneSignalSDK_WP80_Release folder into your project folder.

1.3 In Visual Studio, right click on References and go to "Add Reference...".

2. Add the required Capabilities

2.1 Under Properties folder, open WMAppManifest.xml and then select the Capabilities tab on top. Enable the following 3 capabilities; ID_CAP_IDENTITY_DEVICE,ID_CAP_NETWORKING, and ID_CAP_PUSH_NOTIFICATION.

3. Add Required Code

3.1 In your MainPage.xaml.cs file add using OneSignalSDK; to the top.

3.2 Add the following methods to your MainPage.xaml.cs file:

protected override void OnNavigatedTo(NavigationEventArgs navEventArgs) {
    base.OnNavigatedTo(navEventArgs);
    OneSignal.Init("5eb5a37e-b458-11e3-ac11-000c2940e62c", ReceivedNotification);
}
// Called when the user opens a notification or one comes in while using the app.
private static void ReceivedNotification(string message, IDictionary<string, string> additionalData, bool isActive) {
}

3.3 Replace 5eb5a37e-b458-11e3-ac11-000c2940e62c with your OneSignal App Id.

Done! You should be all set to go with your Windows Phone 8.0 app.


Unity SDK Setup

Windows Phone 8.1

Generate Credentials

Before you start you must generate a Windows Phone Package SID and Secret

1-6. Follow the Unity Setup SDK Guide

7. Windows Phone 8.1 (WP8.1)

Windows Phone 8.1

Your app does not have to be published however, you must have it created on the Windows Dev Center. Follow our Windows Phone Project SID & Secret setup if you have not done this yet.

7.1 Build from Unity and open the solution file .sln from the created build folder.
7.2 Double click on Package.appxmanifest then select the "Application" tab and scroll down to the "Notifications:" section. Change "Toast capable:" to Yes.

7.3 Under the Capabilities tab make sure "Internet (Client & Server)" is checked. Lastly make sure to save.

7.4 Right click on your VS project and select Store>Associate App with the Store...

7.5 Click Next and sign into your Microsoft account.

7.6 Select your app and press Next.

7.7. Lastly press Associate.

Troubleshooting

If run into any issues please see our Unity troubleshooting guide, or our general Troubleshooting section.


PhoneGap SDK Setup

Windows Phone 8.1

Generate Credentials

Before you start you must generate a Windows Phone Package SID and Secret

1-5. Follow PhoneGap SDK Setup

6. Windows Phone 8.1 (WP8.1)

Skip this section if you use PhoneGap Build

Your app does not have to be published however, you must have it created on the Windows Dev Center. Follow our Windows Phone Project SID & Secret setup if you have not done this yet.

6.1 Run phonegap build windows and open the .sln in <project-root>/platforms/windows/

6.2 Under the Windows Phone 8.1 project double click on Package.appxmanifest then select the "Application" tab and scroll down to the "Notifications:" section. Change "Toast capable:" to Yes.

6.3 Right click on your VS project and select Store>Associate App with the Store...

6.4 Click Next and sign into your Microsoft account.

6.5 Select your app and press Next.

6.6. Lastly press Associate.


Cordova SDK Setup

Windows Phone 8.1

Generate Credentials

Before you start you must generate a Windows Phone Package SID and Secret

1-5. Follow Cordova SDK Setup

6. Windows Phone 8.1 (WP8.1)

Your app does not have to be published however, you must have it created on the Windows Dev Center. Follow our Windows Phone Project SID & Secret setup if you have not done this yet.

6.1 Run cordova build windows and open the .sln in <project-root>/platforms/windows/

6.2 Under the Windows Phone 8.1 project double click on Package.appxmanifest then select the "Application" tab and scroll down to the "Notifications:" section. Change "Toast capable:" to Yes.

6.3 Right click on your VS project and select Store>Associate App with the Store...

6.4 Click Next and sign into your Microsoft account.

6.5 Select your app and press Next.

6.6. Lastly press Associate.


Ionic SDK Setup

Windows Phone 8.1

Generate Credentials

Before you start you must generate a Windows Phone Package SID and Secret

1-5. Follow Ionic SDK Setup

6. Windows Phone 8.1 (WP8.1)

Only Ionic 1 supports Windows Phone 8.1 projects
Your app does not have to be published however, you must have it created on the Windows Dev Center. Follow our Windows Phone Project SID & Secret setup if you have not done this yet.

6.1 Run ionic build windows and open the .sln in <project-root>/platforms/windows/

6.2 Under the Windows Phone 8.1 project double click on Package.appxmanifest then select the "Application" tab and scroll down to the "Notifications:" section. Change "Toast capable:" to Yes.

6.3 Right click on your VS project and select Store>Associate App with the Store...

6.4 Click Next and sign into your Microsoft account.

6.5 Select your app and press Next.

6.6. Lastly press Associate.


Intel XDK Setup

Windows Phone 8.1

Generate Credentials

Before you start you must generate a Windows Phone Package SID and Secret

1. Follow Intel XDK Setup

1.3. Windows Phone 8.1 - Open intelxdk.config.additions.xml and add the following lines.

<preference name="windows-target-version" value="8.1" />
<preference name="WindowsToastCapable" value="true" />

Marmalade SDK Setup

Windows Phone

Generate Credentials

Before you start you must generate a Windows Phone Package SID and Secret

1-6. Follow Marmalade SDK Setup

7. Windows Phone Setup

Windows Phone

7.1. From the Marmalade hub press BUILD then package to create an up to date WMAppManifest.xml release file with some OneSignal settings defaulted in.

7.2. Copy WMAppManifest.xml from build_PROJECTNAME_vc12_wp8toolset\deployments\default\wp8\release\wp8-arm\intermediate_files to the root of your project folder and rename it to ProjectWP8Manifest.xml.

7.3. Open ProjectWP8Manifest.xml and add <Capability Name="ID_CAP_PUSH_NOTIFICATION"/> under <Capabilities>.

7.4. Replace the current <DefaultTask> tag with <DefaultTask Name="_default" NavigationPage="Marmalade.App;component/MainPage.xaml"/>

API Documentation

See our Windows Phone SDK API.