Apache cordova is a framework used for developing hybrid apps and was a core part of phonegap. Microsoft added cordova support from visual studio 2013 update 3.
The preview release of VS 2015 comes with cordova tools.
So what is a multi device hybrid app?.
How do I create a hybrid app?
Cick on the Blank app, VS create a solution with the following structure
Its easy, the file config.xml contains configuration for all the devices, and opens a configuration window like below when clicked.
Lets have a look at the structure
- index.html : is starting point of the app
- scripts folder contains all the Jscript files referenced,
- css folder contains all the stylesheets that app references
- Images folder contains images
- res folder contains all the resources
- merge folder contains all the device specific overrides
You can modify index.html with your own content.
How do I build and test the app in multi devices?
Its easy, with the help of solution platforms configuration.
Select one of the solution platforms
- Windows phone
and select the device type in each selected solution platform
Build the project and run the app.
Change the solution platform to Android and device type to android emulator
Change the solution platform to Windows Phone and device type to Windows phone emulator
IOS emulators require remote agents to run, so I haven’t configured any but in future posts I’ll try to build one for IOS platform.
Visual studio with cordova tools also supports ripple emulators with the help of chrome browser. If you wish not to run device specific emulators because of performance, just use ripple emulators. The advantage of ripple emulators is that it supports real time updates i,e. once you open ripple emulator in chrome, any changes that are made in the app are reflected immediately in the emulator.
Deploying apps in app stores
Visit this link http://msdn.microsoft.com/en-us/library/dn757048.aspx