cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From progmars <>
Subject Cordova applications on Windows Phone 8.1 - issues and workarounds
Date Thu, 22 May 2014 14:39:53 GMT
Hi all.

I'm a beginner with Cordova development and I wanted to share my 
experience and offer some code bits to fix them.

At first I think I found a bug. Here is full information:

I have no idea why it's the case - maybe Microsoft has changed something 
in Windows 8.1 and now the MiniBrowser_ScriptNotify calls are completely 

I think the fix mentioned in should be implemented 
anyway because it seems more safe and correct solution to have a 
separate callback function for each request instead of the current 
single window.__onXHRLocalCallback. I added a comment there but I'm not 
sure whether to create a new ticket or Cordova team will reopen the 
existing one if necessary.

And some more info while looking forward to Windows Phone 8.1. I found 
that to build and deploy my Cordova app for Windows Phone 8.1 SDK, I had 
to change some things in the Cordova VS project template. At first, I 
had to add redirects for assemblies in CordovaDeploy.csproj file:


Also, I had to change CordovaDeploy\Program.cs

replace with

And one more problem, maybe not related to WP8.1 but to the fact that 
I'm running the emulator in VMWare machine. Sometimes Corodova Deploy 
failed to access debugOutput.txt file on the emulator. I did some 
debugging and found out that it tries to access the file too soon. Thus 
I added some hacky workaround code:

string dbFilePath = Path.DirectorySeparatorChar + "debugOutput.txt";
int waitForFileToAppear = 0;
while (!isoFile.FileExists(dbFilePath))
     if (waitForFileToAppear >= 60)
     throw new InvalidOperationException("Cannot wait for debug output 
file anymore");

and now it works fine.

I hope my code bits and experience will be useful for other developers 
and maybe some of the mentioned fixes will get into the Cordova source.


View raw message