I am probably too late to answer this for you, but hopefully it'll be of some use for someone else. I was having an issue with this as well and decided to just not do it through Cordova, but instead utilize the .NET way provided by Parse. This is poorly elsewhere documented (except Parse) from what I've experienced, and we got frustrated doing this on Android too and ended up doing it through Java.
First, open your project folder, go into the Platforms folder and then into the WP8 folder and open that platforms Visual Studio's Solution file.
Then right click the C# Project Directory in the solution explorer as shown below. Select "Manage NuGet Packages".
Then search for "Parse" in the NuGet Package Manager and click Install:
Then go into your App.xaml.cs
file (shown in the screenshot):
And add the following after all the imports in the C# file: using Parse;
Then inside the App class constructor inside the same App.xaml.cs
file add the following:
this.InitializeComponent();
this.Suspending += OnSuspending;
ParseClient.Initialize(APP_ID_HERE, .NET_KEY_HERE); // these values come from Parse
this.Startup += async (sender, args) => {
ParseAnalytics.TrackAppOpens(RootFrame);
await ParsePush.SubscribeAsync("");
};
Then lastly enable the ID_CAP_PUSH_NOTIFICATION
capability in your WMAppManifest.xml
as shown:
Once all that is done you should be able to receive unauthenticated push notifications from Parse. Hope this helps, I had a lot of issues myself finding a working Cordova implementation for Windows Phone 8.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…