问题
I am working on phonegap (IOS) since 6months, application is ready to go. but now i want this application to run on visualstudio.
i am useing VS2010 and also installed windows sdk for phone development.i have also install cordova template for windows and its working fine for new development.
but now all i want to use my ready made phonegap application thas was made in xcode for ios in windows.
How can i make it possible ?
Edits : When trying to run my ios application to VS i just replace WWW folder of application in VS and try to run application.it opened emulator well and even called first "Index.html" page but no css/js refrence its getting.even no click events are called. so is there any change in WWW folder structure that i have to perform for windows ? i am new for windows phone.
回答1:
- Buld project; then check all your files exist in CordovaSourceDictionary.xml
- If not, make sure all your files have a build action Content (How to set Build Action on a file - Advanced Properties Not Displayed in properties window)
- If this didn't help try adding the following lines to your index.html to see if there is any js error (errors will be shown in VS Output Window - Ctrl+Alt+O)
<script type="text/javascript"> window.console = { log: function (str) { window.external.Notify(str); } }; // output errors to console log window.onerror = function (e) { console.log("window.onerror ::" + JSON.stringify(e)); }; console.log("Installed console !"); </script>
回答2:
The cordova.js might be different on WP. Try to create a brand new WP project then copy the cordova.js to the www folder and you are good to go.
来源:https://stackoverflow.com/questions/14826387/how-to-run-existing-phonegapios-app-in-visualstudio-for-windows-development