---
description: >-
  What is Ionic and Capacitor, and why did we choose Ionic Angular for this
  starter
---

# Understand the Frameworks

## What is Ionic ?

In short — If you create Native apps in Android, you code in Java. If you create Native apps in iOS, you code in Obj-C or Swift. Both of these are powerful but complex languages. **With Ionic and Cordova/Capacitor you can write a single piece of code for your app that can run on both iOS and Android** (and windows!), that too with the simplicity of HTML, CSS, and JS.

It is important to note the contribution of Cordova/Capacitor in this. Ionic is only a UI wrapper made up of HTML, CSS and JS. So, by default, Ionic cannot run as an app in an iOS or Android device. Cordova/Capacitor is the build environment that containerizes (sort of) this Ionic web app and converts it into a device installable app, along with providing this app access to native APIs like Camera etc.

## Capacitor — How is it different from Cordova ?

![](https://3608702775-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LsQWILyBp_9nWmIJ7TG%2F-Luaql4ybbrVCOmuA2pZ%2F-LuarffhhXchatSRcvD5%2Fimage.png?alt=media\&token=2a55e3bd-3b52-4118-bda1-54f9ad98cb1b)

> _**Capacitor is very similar to Cordova, but with some key differences in the app workflow**_

Cordova helps build Ionic web app into a device installable app. But there are some limitations of Cordova, which Capacitor tries to overcome with a new App workflow.

Capacitor is a cross-platform app runtime that makes it easy to build web apps that run natively on iOS, Android, Electron, _and_ the web. Ionic people call these apps “Native Progressive Web Apps” and they represent the next evolution beyond Hybrid apps.

Here are the differences between Cordova and Capacitor

1. Capacitor considers each platform project a _source asset_ instead of a _build time asset_. That means, Capacitor wants you to keep the platform source code in the repository, unlike Cordova which always assumes that you will generate the platform code on build time
2. Capacitor does not “run on device” or emulate through the command line. Instead, such operations occur through the platform-specific IDE. So you cannot run an Ionic-capacitor app using a command like `ionic run ios` . You will have to run iOS apps using Xcode, and Android apps using Android studio
3. Because of the above, Capacitor does not use `config.xml` or a similar custom configuration for platform settings. Instead, configuration changes are made by editing `AndroidManifest.xml` for Android and `Info.plist` for Xcode
4. Since platform code is not a _source asset,_ you can directly change the native code using Xcode or Android Studio. This give more flexibility to developers. We will do some similar changes for Twitter login as well.

## **Plugins**

Cordova and [Ionic Native](https://ionicframework.com/docs/native) plugins can be used in Capacitor environment. However, there are certain Cordova plugins which are known to be [incompatible with Capacitor.](https://capacitor.ionicframework.com/docs/cordova/known-incompatible-plugins/) For Twitter login functionality, we’ll use the [Capacitor Twitter login plugin](https://github.com/stewwan/capacitor-twitter)

Other than that, Capacitor also doesn’t support plugin installation with variables. Those changes have to be done manually in the native code. We will do something similar in this post.

## Why Ionic Angular ?

![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LrE4OltZqdI7pBHnBKw%2F-LrE5Y22p188cSIv1C8a%2F-LrECCcAKzvJQsbni4K2%2Fc7ef26d1ee42fbd72c4a44fd76db6234cc889dfd_ionic-vs-react-native.png?alt=media\&token=b1711bb3-f8aa-44ec-b965-113e1d223c71)

Since Ionic 4, Ionic has become framework agnostic. Now you can create Ionic apps in Angular, React, Vue or even in plain JS. This gives Ionic great flexibility to be used by all kinds of developers.&#x20;

Ionic has always had Angular under the hood. With Angular upgrading to new versions every 6 months or so, Ionic has been catching up real nice. Ionic 4 has compatibility with Angular 7 & 8, and almost all the native features are compatible with Angular.&#x20;

{% hint style="info" %}
**Ionic Angular apps are supported by both Cordova and Capacitor build environments.** This is a great option for developers who want to choose build environment based on their convenience.

Same is not true for Ionic React apps — **Ionic React apps are only supported by Capacitor build environment.**&#x20;
{% endhint %}
