Do you know the difference between a Native and a Hybrid app? Basically, a native app is an app developed using the Android SDK or written in Objective C. These native apps will only run in the specific mobile platform it is built for.
A hybrid app, on the other hand, is written on a different programming language other than the native Android, Objective-C and Windows, and also, it can run on two or more mobile platforms using the same code base.
The Ionic Framework produces mobile apps that are Hybrid or cross-platform in nature. Thus, it can run on both Android, iOS and even on Windows devices. This is one of the main advantages of Ionic – you only need one master codebase and with that, you can deploy your app to the PlayStore, AppStore or the Microsoft Store. That saves you a lot of time compared with writing a totally new codebase just to be able to deploy and run your app to different mobile platforms.
When you build your project to a specific platform, the Ionic framework will call on Apache Cordova to generate either an Android, XCode or Windows Mobile project out from your web code.
So for example, you have an Ionic app and then you execute the: “ionic build ios” command. The Ionic Framework will call Apache Cordova to read the config.xml file and all of your source code to generate a new XCode project and then place it to the “platforms” directory.
For Android, it will generate an Android Project and place it to the “platforms” directory as well. This process will be the same for Windows, Blackberry, and other mobile platforms.
One important configuration file that you have to maintain here is the Config.xml file. This is a global configuration file that contains your app’s metadata and controls many aspects of your application’s behavior. Basically, it is just an XML file that specifies the list of cordova plugins your app is using including all of the platform-specific settings you want to add.
Ionic also provides easier ways to generate your mobile app builds to be able to deploy it on App Store or Play Store.
Alright, now that we understand the concept of how Ionic works on the background, let us now see it in action through our succeeding lessons!