{"id":144,"date":"2014-08-23T09:06:00","date_gmt":"2014-08-23T07:06:00","guid":{"rendered":"https:\/\/celilsemi.erkiner.com\/blog\/?p=144"},"modified":"2020-05-27T08:13:42","modified_gmt":"2020-05-27T06:13:42","slug":"what-is-apache-cordova","status":"publish","type":"post","link":"https:\/\/celilsemi.erkiner.com\/blog\/what-is-apache-cordova\/","title":{"rendered":"What is Apache Cordova?"},"content":{"rendered":"\n<p>In the past years, making a native mobile app was all about being good in the mother tongue of the operating system that you created an app with. This means Objective C for iOS, Java for Android and C# for Windows Phone.<\/p>\n\n\n\n<p>Welcome to the 21st century, where you can write javascript to create not only web pages, but also mobile applications.<\/p>\n\n\n\n<p>With the help of Apache Cordova, a game-changer open-source framework, you can target multiple platforms with a codebase. All you need to learn is the normal HTML, CSS and JavaScript used for web development, and by reading some Cordova documents, you must already be a mobile developer.<\/p>\n\n\n\n<p>The beauty of Cordova is that it allows developers to develop web development skills to create mobile applications on several different platforms. Using standard HTML, CSS and JavaScript, a single code base can become apps for Apple, Android and Windows phones.<\/p>\n\n\n\n<p>Cordova also has a wide variety of plugins that allow interacting with the device&#8217;s native functions via JavaScript. With Cordova plugins, we can allow our app to easily interact with the camera, GPS, push notifications and many other functions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hello Cordova<\/h2>\n\n\n\n<p>Cordova application creation requires Nodejs and their CLI. Cordova CLI is a command-line interface that simplifies the process of creating new Cordova applications on the system of your choice. After installing Nodejs, open terminal to use the node package manager.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">npm install -g cordova<\/pre><\/div>\n\n\n\n<p>After installing Cordova CLI through NPM, you can use it to create your first application.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">cordova create hello com.example.hello HelloWorld<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2020\/05\/image-1024x557.png\" alt=\"\" class=\"wp-image-145\" width=\"449\" height=\"244\" srcset=\"https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2020\/05\/image-1024x557.png 1024w, https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2020\/05\/image-300x163.png 300w, https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2020\/05\/image-768x418.png 768w, https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2020\/05\/image-1536x835.png 1536w, https:\/\/celilsemi.erkiner.com\/blog\/wp-content\/uploads\/2020\/05\/image.png 1604w\" sizes=\"auto, (max-width: 449px) 100vw, 449px\" \/><\/figure>\n\n\n\n<p>Congrats on your first mobile app, &#8220;www&#8221; folder is your new workplace. After the development process with web technologies, you can run the following commands to prepare your app for various platforms. <\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">cordova platform add android\ncordova prepare android<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">cordova platform add ios\ncordova prepare ios<\/pre><\/div>\n\n\n\n<p>Cordova wraps the whole project in a platform specific project output and and sets up everything in a way that will run &#8216;www\/index.html&#8217; on app launch.<\/p>\n\n\n\n<p>Output projects under &#8216;platforms&#8217; folder needs to be compiled separately according to platform specifics. After completion, they are ready to be shipped to app stores!<\/p>\n\n\n\n<p>This is just a brief explanation of the process. I recommend you spend some time looking at what the Cordova has to offer, looking at the available documentation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the past years, making a native mobile app was all about being good in the mother tongue of the operating system that you created an app with. This means Objective C for iOS, Java for Android and C# for Windows Phone. Welcome to the 21st century, where you can write javascript to create not [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[7],"tags":[23,14,20,4,19],"class_list":["post-144","post","type-post","status-publish","format-standard","hentry","category-front-end","tag-apache","tag-cordova","tag-hybrid","tag-javascript","tag-mobile"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/posts\/144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/comments?post=144"}],"version-history":[{"count":5,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/posts\/144\/revisions"}],"predecessor-version":[{"id":150,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/posts\/144\/revisions\/150"}],"wp:attachment":[{"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/media?parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/categories?post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/tags?post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}