a blog for those who code

Tuesday 29 September 2015

Ionic Project Configuration using config.xml

In this post we will be discussing about configuring your Ionic project using config.xml in Visual Studio. In our previous post we have discussed about the Ionic Project Structure in Visual Studio where we have learnt the different files and folder in Ionic Project. The config.xml file is the main configuration file for your ionic project.

config.xml file consists of all the meta information like platforms, plugins, etc. which is actually needed by Cordova to convert your ionic app to a platform specific (Windows, iOS and Android) installer. You can say that this file is a platform agnostic configuration file. There is two types of configuration that you can add in this file, one is global (common to all devices) and other is specific to the platform (Windows, iOS and Android).

If you open config.xml file in Visual Studio you will see something like below where you have tabs like Common, Platforms, Plugins, Windows, Android and iOS.


In the Common Tab you will be asked to fill the details of your app which will be common for all the platforms like Display Name of your app, Default Locale of your app. In this tab you can fill up Display Name, Start Page, Default Locale, Package Name, Version of your app, Author, Description of your app, Orientation (Landscape, Portrait or both), Full Screen and Domain Access.

Next comes Platforms tabs where you have to specify the version of Cordova CLI that will be used to build your project. Try not to change the Version of Cordova CLI because changing the Cordova CLI version may impact your application code.


Next comes Plugins Tab where you have list of plugins (Battery, Camera, File, etc) which can be added to your application. The Core Plugins includes Battery, Camera, Capture, Console, Contacts, Device, Device Motion, Device Orientation, File, File Transfer, GeoLocation, Globalization, InAppBrowser, Media, Network Information, Notification, Splashscreen, StatusBar, Vibration, Web SQL Plugin, Windows Azure Mobile Services. Along with the Core one you have an option to add the custom plugin from your local or from Git.


Next comes Windows Tab where you can set the properties for the Windows Store version of your app like Display Name, Package Name, Version and Windows Target Version.


Next comes Android Tab where you can set the properties for the Android version of your app. The properties which you can set are Version Code, Minimum SDK Version, Maximum SDK Version, Target SDK Version, Keep Running, Launch Mode (singleTop, standard, singleTask and singleInstance), Show Title and In-App Browser Storage.


Next comes iOS Tab where you can set the properties for the iOS version of your app. The properties are Target Device (Universal, iPhone, iPad), Target iOS Version, Web Storage Backup (Cloud, Local or None) and Suppresses Incremental Rendering.


Please Like and Share CodingDefined.com Blog, if you find it interesting and helpful.

No comments:

Post a Comment