How to run existing phonegap(ios) app in VisualStudio for windows development

坚强是说给别人听的谎言 提交于 2019-12-07 16:31:07

问题


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:


  1. Buld project; then check all your files exist in CordovaSourceDictionary.xml
  2. 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)
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!