Microsoft announced to adding support for popular Apache Cordova framework from visual studio so user can easily build application for iOS, android, windows phone and windows platforms, this makes every hybrid application developers to be happy. I hope most of them already known about the Apache Cordova, still you not heard about Apache Cordova, don’t worry here is short introduction about Apache Cordova framework.
what is Apache Cordova framework
Multi-Device Hybrid apps using Visual Studio Cordova
Currently microsoft released ctp 2.0 extension for multi-device hybrid apps using visual studio cordova along with visual studio update 3, in this release microsoft fixed more then 300 bug fixes and added support for windows 7 desktop, in previous release of ctp 1.0, 1.1 and 1.2 it only support windows 8.1 Desktop, so now user can create multi-device hybrid apps using visual studio cordova without upgrading their current OS.
It is easy to configure the ctp 2.0 extension, to install and configure the multi-device hybrid extension please follow this microsoft official documentation.
Create first multi-device hybrid apps using visual studio cordova
while creating a new project make sure you not use spaces in project name and saved project directory, for multi-device hybrid apps visual studio will not allow spaces.
the created multi-device hybrid apps contain the following folders
css – used to add application style sheet files.
images – suggested image location for application
merges – for platform specific code
res – used to add platform specific appicon, splash screen and certificates
scripts – used to add application scripts files.
Configure the Multi-Device hybrid apps
Config.xml file is used to configure the multi-device hybrid apps, double click the config.xml file to open the configuration designer.
if you want to use any plugins into your applications, you must have to select the appropriate plugin in the plugin section, for eg if you like to use camera plugin, must have to enable camera api in the plugin list.
And you can add the platform specific content using res folder in the created application.
res\icons\platform – contains the app icons for each platform
res\screens\platform – contains splash screens for each platform
in specified folder already having the default images, all the contained image name represents the platform and specification of the image.
Running Multi-Device hybrid apps using visual studio cordova
For running the Multi-Device hybrid apps, visual studio added Supported platform section, from this list user can select iOS, Android and windows platforms.
and also user can run the applications on Device, Simulator and Ripple Simulator. you can directly install the application into android and windows by connecting the device to your pc
for installing the iOS application into device have to configure the ios remote agent in mac os, the installed mac os act as server by specifing the by server ip address into the below location.
Debug –> options and settings –> Multi-Devic hybrid apps
and user can use ios simulator, but it will open the application on the specified mac server.
if you are selected iOS Ripple simulator you can the see the output like below. and also you can debug the application like native.