0
votes

I have a Cordova app working in Android and I want the windows phone version. (windows cordova platform)

The package is created correctly and the app appears in the phone (a real device). But when I try to open it, just after show the splashscreen the app it closes.

I don't have experience with windows phone and Visual Studio. How can I research for the error? Is there any tool in Visual Studio that shows me some message error?

I've tried the windows Phone developer tools with the phone connected and shows me performance information but I was not able to see anything interesting about the app failure.

I've tried to deploy the default "hello world" cordova app and it works well, then it seems it's not any problem related with my configuration and sdk installed.

Any idea?

Thank you.

2
Have you tried a breakpoint at the starting point of your app ? Anything in the log ?Chris Neve
It's a Cordova app, it's executed in a WebView, I don't know how to debug (it's possible in Chrome and Android) in windows phone. What log? this is my main question, I don't know how to deal with this kind of thins in windows phone. In the console when I execute cordova run windows... all it seems correct, there is no error messages.Oscardr
As a first step, I would recommend installing Visual Studio (the free version is called Community) and opening the project in VS (the project file has a .sln extension). Then you can debug and have a look at the log. Quick thought: are you using jQuery? Windows applications use a library called WinJS which is incompatible with jQuery.Chris Neve
Alternatively you could subscribe to window.onerror and save the error details to a file (to extract it via Windows Phone Developer Power Tools later).daserge
Thank you for your answers. @ThomCunningham yes I use jquery and Angularjs. am I not able to use jquery?. I'm going to open the project in VS thanks.Oscardr

2 Answers

0
votes

In Visual studio press View=> output. Then u can view your html console. That windows will show the error or message.

0
votes

Finally I could see the errors following the instructions of Thom.

It's possible to open a Visual Studio project with a sln file placed inside the platforms/windows folder.

Then with Visual Studio is easy to open the app and see message errors.

In my case the problem is not jquery. It seem the problems with jquery and windows phone apps was solved with the 2.0 version.

My problem is with Angular. I found a js library to make Angular compatible with windows phone:

https://github.com/Microsoft/winstore-jscompat

With this script I solved my problems.

Thanks for all your answers