Visual Studio Toolbox

Multi-Device Hybrid Apps for Apache Cordova

Download this episode

Download Video

Download captions

Download Captions


In this episode, Robert is joined by Ryan Salva, who shows us the recently released CTP 2.0 of the Extension for Multi-Device Hybrid App Development. With this extension, you can use Visual Studio and Apache Cordova™ to easily build hybrid apps that run on iOS, Android, Windows, and Windows Phone using a single project based on HTML and JavaScript. Ryan demos the basics of building, debugging and deploying multi-device hybrid apps.



Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • konark1234

      good presentation indeed. Personally, after the demise of WPF.. I am happy again. Way to go microsoft....

    • Laura

      Any plans to show how to connect to a database stored in Azure and display results to the app?
      I have created a WCF project and would like to know how to consume the service from the cordova project.

    • Enginerd

      Laura, Azure Mobile Services should have built in support for Cordova at this point.

      If you want to build your own services on top of Azure, instead of using the mobile services, you'll want to build an HTTP based service, rather than a SOAP one if possible.  Then you can use the same patterns you see in the above link.  WebAPI is a quick way to put together a http / REST service on top of your Azure DB.





    • Andrew C

      How does this relate to Adobe Phonegap? I've been using the integration with Adobe's build service in Dreamweaver to build for iOS and Android.

    • the deaf guy

      awesome video . I wish I can understand them because I am deaf.
      Please add subtitle.

    • Joel

      I love VST and appreciate this episode but I would like to comment politely that I am 30min into the video and I've seen hardly any code. Each question from Robert leads to a ponderous response lasting several minutes where a brief answer would have sufficed. Keep up the good work but keep it moving. :)

    • PeterNL

      No mentioning of Adobe Phonegap at all. Rather odd, as it has the largest developer-base for Cordova. Perhaps better leaving out the naming of existing competitors. Part of Microsoft's deceivable marketing tactics with open-source and competition in general. You cannot buy it, and requires an open-mind for community sharing.

    • Andrew

      Multiplatform typescript and HTML driven apps... Visual Studio just became the undisputed king of the world.... next step native java and objective C support...

    • Oerni

      I'm using Telerik AppBuilder and it's a great Tool.

      And there is one big feature that the MS Extension is still missing:

      They have a Cloud based build Service for iOS.

      I don't have a Mac i won't buy one only for building iOS Apps.

      As long as this feature is missing I'll stay with Telerik.

    • briankel

      @the deaf guy:Sorry for the delay, Robert is on a hiking trip and I just noticed your comment. I have asked the Channel 9 team if they can transcribe this one and it's in the queue. Usually it takes 3-4 days but since Monday is a holiday in the US it might be a bit longer than usual.

    • rogreen

      @Joel: Thanks for the feedback. I will try and keep things on track in future episodes. :)


    • NeelKhalade

      I have installed it in my Visual Studio 2013.3 pro....I am a Student in 10th grade and I am having this software through I was too glad to build a single app on many platforms but it has error. I have installed it correctly but 1st thing its not running in Windows 8.1 and other it fails to run app in AVD (Android Virtual Device) and my project fails to build I get some errors that has ending "....exited with code 8"; "......exited with code 2"!!!! Well I hope that 3.6 version would not have this issues!

    • ryanjsalva

      @NeelKhalade: sorry to hear you're having problems building. If you'd like help debugging, our product team monitors StackOverflow for questions. So far, we have a pretty good track record with answering questions and solving problems; Most get answered within a single business day. There are several amazing engineers monitoring the forums there who can help resolve your problem.

      @Oerni: I totally know what you mean about the cloud build service and Telerik does a mighty fine job with it. Rest assured that cloud build services are on our radar and we're looking for ways to enable developers like you to build without a mac on-premise.  I'll add your feedback to our backlog: +1 for cloud build.

      @PeterNL: You're totally right; I should have mentioned PhoneGap. Sometimes, when listing off great technology, we forget some of the most obvious choices.

      @Andrew C: Adobe actually has quite a few tools and services under the "PhoneGap" brand. In my experience, when most people talk about PhoneGap, they're talking about the PhoneGap build service. The PhoneGap build service uses Apache Cordova (the same OSS platform used by our tools) to build your application for iOS, Android and Windows in the cloud. When using PhoneGap build services, a developer will typically code their app locally using a text editor (e.g. SublimeText) and emulator (e.g. the PhoneGap Developer App), then push their code to the cloud where the PhoneGap build service creates native packages for each target OS.

      Using Visual Studio tools, the build happens on your local machine rather than in the cloud. This has a few advantages. For example, local build time is typically faster. Also, if you're working on a project with privacy concerns (e.g. healthcare, finance, government), you maintain complete control over your code and data. At the same time, there are a few disadvantages to local build -- namely, that you need a Mac to build for iOS and need to install a number of OSS tools on your local machine (e.g. Node, Android SDK). Of course, we try to lessen that pain by providing automatic download, install, configuration and updates of the full tool chain. But still, some folks prefer cloud build because it simplifies your local dev environment.

      @Joel: Sorry I got a little long-winded there. I really was trying to get to the code. I promise to get to the code a little faster next time :)

    • SK Dutta

      This is great and it allows me to create cordova applications inside visual studio. What would be cool if microsoft gave us similar feature like Adobe Phonegap or Intel XDK, i.e. provide us with the backend compiler running on their cloud (azure) so that we do not have to get a Mac or install Android SDK (with slow emulator) to create cordova applications.

    • ryanjsalva

      @SK Dutta: Thanks for the feedback. Cloud build services are on our radar and something we're carefully considering for the future. In the meantime, I encourage you to keep an eye on the Visual Studio Blog or follow us on Twitter @VSCordovaTools. We hope to publish a tutorial in the next month describing how you can use cloud-based services with our tools. Keep the feedback coming!

    • George

      Great vid. But a question - is there anyway you can include extra files and file overrides for the app Cordova native code? In our case we need a few lines of native code to alter something on the embedded webview for android and ios apps. At present we have the android and ios Cordova native source files and these changes all checked in to source control and the Cordova build, etc still works fine. Can you achieve the same using this vs project somehow?

    • George

      Great vid. But a question - is there anyway you can include extra files and file overrides for the app Cordova native code? In our case we need a few lines of native code to alter something on the embedded webview for android and ios apps. At present we have the android and ios Cordova native source files and these changes all checked in to source control and the Cordova build, etc still works fine. Can you achieve the same using this vs project somehow?

    • George

      Great vid. But a question - is there anyway you can include extra files and file overrides for the app Cordova native code? In our case we need a few lines of native code to alter something on the embedded webview for android and ios apps. At present we have the android and ios Cordova native source files and these changes all checked in to source control and the Cordova build, etc still works fine. Can you achieve the same using this vs project somehow?

    • briankel

      Hi George, we've noted your question (three times now :)).

      Ryan is working on a response for you. He's traveling now but should be able to respond in the next few days.

    • George

      Sorry! Viewing on my ipad and everytime I switched back to the tab it auto reloaded and submitted again... Argghhhh, should have watched on my surface eh!!

    • gmel297

      hy all, how i can begin vs community that has integrated with phonegap tool? do i have to install visual studio 2013 (maybe express?) first or just directly the NEW visual studio community 2013?

    • ryanjsalva

      @George: Hmmmm... without knowing the specifics of you project, it's hard to say. Have you tried implementing the behavior as a Cordova plugin? Hundreds of developers already create and share their plugins via, so it's a pretty common and well-understood task. Each plugin consists of at least two parts: (1) a common JavaScript API exposed to the webview and (2) native code for each of the target platforms to implement the native functionality. Just remember that you'll need to write native code for each target platform using the native tools for that platform (e.g. Swift or Objective C for iOS using Xcode; Java for Android using Eclipse; C#, C++ or JS for Windows using VS). It sounds like you've got a pretty experienced team, but if you need help there are lots of tutorials out there explaining how to write Cordova plugins.

      If you absolutely need to overwrite Cordova itself, I'm not personally aware of a way -- outside of plugins -- to selectively overwrite the native code. Your approach to checking-in and modifying Cordova might be the best approach.

    • ryanjsalva

      @gmel297: If you want to use the Tools for Apache Cordova -- which use the same underlying technology as Adobe PhoneGap, but are not the same as Adobe PhoneGap -- you can simply install Visual Studio Community Edition and select Tools for Apache Cordova from the list of optional components during setup.

      If you have any problems or questions while using the tools, feel free to reach out to the product team via email at or find us on StackOverflow with the tag visual-studio-cordova. Happy coding!


    • ryanjsalva

      @George: if you contact the product team via email,, we'd love to assist with your use case. Perhaps we can improve the product to make it easier for others in the future. After talking with a few of my team members, there seem to be at least three options:

      1. Plugins are the best way to inject native code – but there are limits.  Modifying the webview may not be possible with a plugin.
      2. The /res directory available in CTP3 maps to the root of the /platform directory and should give you access to overwrite the files you need, but may not survive an upgrade to a different version of Cordova. You should exercise care when upgrading to new versions of Cordova.
      3. You could continue to check-in Cordova code, though that's actively discouraged from a "best practices" standpoint.

      We look forward to hearing from you soon!

    • Shane Aleksic

      This is awesome! I've been waiting for something like this to happen for a very long time. I built an app in my spare time and it runs on this exact same technology stack such as phonegap/cordova, jquery, or whatever javascript library/framework of my choice. I've been building in Eclipse with Android SDK and it has been painfully slow viewing code changes in the emulator. This Ripple emulator is a fantastic way to prototype. Also, being able to test on other emulators out of the box without having to hunt down the tools is completely spectacular. Welcome to the future of write once read many places!

    • ryanjsalva

      @Shane Aleksic: That's pretty awesome! Glad you've had some experience with the technology. If you happen to give our tools a try, please let us know what does and doesn't work for you. You may also want to give our new Android emulator a try. It's waaaaay faster than the Android SDK emulator and comes free with Visual Studio 2015 Preview.

    • Jason

      Are there any plans to create a UI framework too? Most UI frameworks I see are for iOS and Android. They are either not optimized for WP or not supported at all.

    • Rahul

      This works on community edition of visual studio 2013?

    • ryanjsalva

      @Jason: There are lots of great UI frameworks out there. Ionic is very popular among the Cordova community and designed to compliment Angular JS. However, it doesn't have full support for WP. Honestly -- and I'm not just saying this because I work at Microsoft; I really believe it -- WinJS provides a really terrific mobile experience. The team building WinJS has invested a lot of effort in creating a touch-centric UI framework that's impossibly fast on mobile devices for all platforms (iOS, Android and Windows). 

      @Rahul: Yes, the Tools for Apache Cordova also work on the Community Edition. 

    • Jose Alberto

      Hello, first and foremost I want to Thank you guys for develop this terrific tool.Having done that, I wish you to help me please :( I want to connect with a WCF or a classic Web Service an app developed with apache cordova in VS 2013 community, can this be done (because always give me trouble with $.ajax calls)? I dont have credit card to buy an account in windows azure so I need to explode this way, please answer me as soon as it possible, thanks for your time! and I´m waiting for your reply

    • ryanjsalva

      @Jose Alberto: yes, you can use the Tools for Apache Cordova with Visual Studio Community Edition. Just install the Tools for Apache Cordova extension. From there, follow the standard conventions for whatever web service APIs you need. Just make sure that you initialize your application ondeviceready rather than onload or ondomready. Hope this helps!

    • Oerni

      @Jose Alberto:I also have a Web Service and a simple Apache Cordova App running and no Problems with $.ajax calls at all. Are you sure that your request header is right? Does you Web Service require any authorization? Are you making https calls? What kind of Errors do you get?

    • Smartmil8

      @ryanjsalva: Could anyone give me a rough period about when the Official release version of "Multi-Device Hybrid Apps (Preview)" of Visual Studio will be?

      I know it's CTP1 at the moment.

      Thanks alot.

    • ryanjsalva

      @Smartmil8: we're actually about to release CTP 3.1 for VS 2013 in the next week or so. For VS 2015, we expect the Tools for Apace Cordova to reach RTM concurrently with VS 2015. 

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.