What's new in Cordova 9.0 compared to Cordova 8.x
Tags: ionic, cordova, apache
Published: 2020-01-10 11:03:40

<main role="main"><article class=" u-minHeight100vhOffset65 u-overflowHidden postArticle postArticle--full is-supplementalPostContentLoaded is-withAccentColors" lang="en"><div class="postArticle-content js-postField js-notesSource editable" id="editor_6" g_editable="true" role="textbox" contenteditable="true" data-default-value="Title
Tell your story…" spellcheck="false"><section name="58de" class="section section--body section--first section--last"><div class="section-divider">


<hr class="section-divider"></div><div class="section-content"><div class="section-inner sectionLayout--insetColumn"><p name="23a6" class="graf graf--p graf-after--figure">In this post, you’ll find out the major difference and upgrades released with Cordova 9, compared to Cordova 8. This includes major platform changes as well as how it affects (Cordova based) Ionic apps. This post is aimed to help developers migrate from Cordova 8.x to 9.0</p><blockquote name="0b06" class="graf graf--blockquote graf-after--p"><strong class="markup--strong markup--blockquote-strong">TLDR; One major change for Ionic apps is that most of the Cordova plugins will now have to be updated to be compatible with Cordova 9.0.0</strong></blockquote><h3 name="7b58" class="graf graf--h3 graf-after--blockquote">Why should you know&nbsp;this</h3><p name="9149" class="graf graf--p graf-after--h3"><a href="https://cordova.apache.org/announcements/2019/03/22/cordova-cli-release-9.0.0.html"  class="markup--anchor markup--p-anchor" rel="noopener"    target="_blank"><strong class="markup--strong markup--p-strong">Cordova 9</strong></a> was released in March this year. It is a pretty big deal considering the already huge and growing community of Hybrid app developers on Cordova and Ionic. If you aren’t aware of Ionic framework, you can head over to <a href="https://ionicframework.com"  class="markup--anchor markup--p-anchor" rel="noopener"    target="_blank">Ionic website</a> and check how awesome a framework it is. I’ll try to explain what Ionic is, in short.</p><h4 name="27e1" class="graf graf--h4 graf-after--p">What is&nbsp;Ionic</h4><p name="3b48" class="graf graf--p graf-after--h4"><strong class="markup--strong markup--p-strong">Ionic</strong> is a complete open-source SDK for hybrid mobile app development. Ionic provides tools and services for developing hybrid mobile apps using Web technologies like CSS, HTML5, and JS. Apps can be built with these Web technologies and then distributed through native app stores to be installed on devices.</p><p name="d7e7" class="graf graf--p graf-after--p"><strong class="markup--strong markup--p-strong">Cordova</strong> enables developers to build applications for mobile devices using CSS3, HTML5, and JavaScript instead of relying on platform-specific APIs like those in Android, iOS, or Windows Phone. It extends the features of HTML and JavaScript to work with the device.</p><blockquote name="2a57" class="graf graf--blockquote graf-after--p">Ionic is actually another wrapper on top of Cordova. Cordova has the basic HTML/CSS/JS → Native capabilities, while Ionic powers neater and powerful layouts and overall app management on top of Cordova</blockquote><p name="de54" class="graf graf--p graf-after--blockquote">In other words&#8202;—&#8202;If you create native apps in Android, you code in <strong class="markup--strong markup--p-strong">Java</strong>. If you create native apps in iOS, you code in <strong class="markup--strong markup--p-strong">Obj-C</strong> or <strong class="markup--strong markup--p-strong">Swift</strong>. Both of these are powerful, but complex languages. With Cordova (and Ionic) 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. I’m a huge fan of Ionic and been developing Ionic apps for last 4 years.</p><p name="7488" class="graf graf--p graf-after--p">Other than Ionic, <strong class="markup--strong markup--p-strong">Cordova also supports the following frameworks</strong></p><ul class="postList"><li name="ae5c" class="graf graf--li graf-after--p"><a href="http://goratchet.com/"  class="markup--anchor markup--li-anchor" rel="noopener"    target="_blank">Ratchet</a>&#8202;—&#8202;Brought to you by the people who created Bootstrap.</li><li name="d17f" class="graf graf--li graf-after--li"><a href="https://www.telerik.com/kendo-ui"  class="markup--anchor markup--li-anchor" rel="noopener"    target="_blank">Kendo UI</a>&#8202;—&#8202;Open source UI and application framework from Telerik.</li><li name="0681" class="graf graf--li graf-after--li"><a href="https://onsen.io/"  class="markup--anchor markup--li-anchor" rel="noopener"    target="_blank">Onsen UI</a>&#8202;—&#8202;Open source UI framework for both websites and Cordova apps</li><li name="5710" class="graf graf--li graf-after--li"><a href="http://topcoat.io/"  class="markup--anchor markup--li-anchor" rel="noopener"    target="_blank">Topcoat</a></li><li name="d3d9" class="graf graf--li graf-after--li"><a href="https://reactjs.org/"  class="markup--anchor markup--li-anchor" rel="noopener"    target="_blank">ReactJS</a></li></ul><h3 name="0ee8" class="graf graf--h3 graf-after--li">How does Cordova update affect Ionic&nbsp;apps</h3><p name="4ed7" class="graf graf--p graf-after--h3">Cordova is actually what allows a hybrid app to talk to native functionalities. Ionic is basically just a wrapper on top of Cordova. In other words, Ionic gives Cordova apps more structure in terms of JS framework (Angular, React), but the actual connection between HTML/JS code and Native functionalities is provided by Cordova.</p><p name="ba1a" class="graf graf--p graf-after--p">E.g. If your Ionic (Angular based) app has a Camera functionality, the Camera of the device is able to talk to the hybrid app because of Cordova, not Ionic. <strong class="markup--strong markup--p-strong">Cordova Plugins</strong> are the bridge between the device native capabilities and hybrid apps. Perhaps this informative image will explain it better</p><figure tabindex="0" contenteditable="false" name="a6cf" class="graf graf--figure graf-after--p"><div class="aspectRatioPlaceholder is-locked" style="max-width: 700px; max-height: 230px;"><div class="aspectRatioPlaceholder-fill" style="padding-bottom: 32.800000000000004%;"></div><img class="graf-image" data-image-id="1*Mld0wY6ChWJMvBVMSGU_5w.jpeg" data-width="1436" data-height="471" src="https://cdn-images-1.medium.com/max/800/1*Mld0wY6ChWJMvBVMSGU_5w.jpeg"><div class="crosshair u-ignoreBlock"></div></div><br/><figcaption class="imageCaption" contenteditable="true" data-default-value="Type caption for image (optional)">Ionic apps&nbsp;…&nbsp;Cordova?</figcaption></figure><p name="9ff3" class="graf graf--p graf-after--figure">So when Cordova version changes,</p><ul class="postList"><li name="fca7" class="graf graf--li graf-after--p">It changes the way Ionic apps are built into Android and iOS apps (platforms change)</li><li name="a8b8" class="graf graf--li graf-after--li">It changes the way Ionic apps interact with native device functionalities (plugins need to change)</li></ul><p name="f8d8" class="graf graf--p graf-after--li">E.g. Recently, Android changed the folder structure of Android projects. Cordova followed it and changed the compiled Android project structure in the new Cordova version. But if you try to build an Android App with the latest SDK, and old Cordova, the resultant app might not work properly. So that’s how it goes in open source world&#8202;—&#8202;you need to stay up to date.</p><blockquote name="c249" class="graf graf--blockquote graf-after--p"><strong class="markup--strong markup--blockquote-strong">The major change for Ionic apps is that most of the Cordova plugins will now have to be updated to be compatible with Cordova 9.0.0</strong></blockquote><h3 name="6d12" class="graf graf--h3 graf-after--blockquote">What has changed in Cordova&nbsp;9</h3><p name="7dea" class="graf graf--p graf-after--h3">As a starter, following major packages have changed in Cordova 9.0</p><ul class="postList"><li name="2871" class="graf graf--li graf-after--p"><code class="markup--code markup--li-code">cordova-android@^8.0.0</code></li><li name="f910" class="graf graf--li graf-after--li"><code class="markup--code markup--li-code">cordova-browser@^6.0.0</code></li><li name="db18" class="graf graf--li graf-after--li"><code class="markup--code markup--li-code">cordova-electron@^1.0.0</code></li><li name="5dc7" class="graf graf--li graf-after--li"><code class="markup--code markup--li-code">cordova-ios@^5.0.0</code></li><li name="22a3" class="graf graf--li graf-after--li"><code class="markup--code markup--li-code">cordova-osx@^5.0.0</code></li><li name="88e5" class="graf graf--li graf-after--li"><code class="markup--code markup--li-code">cordova-windows@^7.0.0</code></li></ul><p name="42a6" class="graf graf--p graf-after--li">Following are some of the major changes in<strong class="markup--strong markup--p-strong"> Cordova 9.0.0</strong> you should be aware of</p><h3 name="c42b" class="graf graf--h3 graf-after--p">Android Changes</h3><figure tabindex="0" contenteditable="false" name="0be1" class="graf graf--figure graf-after--h3 is-defaultValue"><div class="aspectRatioPlaceholder is-locked" style="max-width: 700px; max-height: 230px;"><div class="aspectRatioPlaceholder-fill" style="padding-bottom: 32.800000000000004%;"></div><img class="graf-image" data-image-id="1*CFbP52jiCXeHjIxCeoNyag.jpeg" data-width="1436" data-height="471" src="https://cdn-images-1.medium.com/max/800/1*CFbP52jiCXeHjIxCeoNyag.jpeg"><div class="crosshair u-ignoreBlock"></div></div></figure><h4 name="2164" class="graf graf--h4 graf-after--figure">Use custom Gradle properties to read minSdkVersion value from <code class="markup--code markup--h4-code">config.xml</code></h4><p name="28eb" class="graf graf--p graf-after--h4">Before this release, users who want to modify the <code class="markup--code markup--p-code">gradle.properties</code> file in Cordova Android project would have to modify it directly but this is not the best case. Users may not commit their platform directory. This mean changes are lost each time they remove and add back a platform..</p><p name="80c9" class="graf graf--p graf-after--p"><code class="markup--code markup--p-code">gradle.properties</code> file is created and modified by the <code class="markup--code markup--p-code">cordova prepare</code> step. The first time the file is created would come right after the <code class="markup--code markup--p-code">cordova platform add</code> step which triggers the prepare step. If the user wanted to modify this file and they didn’t commit the platforms, the current best option is to use an <code class="markup--code markup--p-code">after_prepare</code> hook script.</p><p name="859a" class="graf graf--p graf-after--p"><strong class="markup--strong markup--p-strong">Cordova 9.0.0 now reads </strong><code class="markup--code markup--p-code"><strong class="markup--strong markup--p-strong">minSdkVersion</strong></code><strong class="markup--strong markup--p-strong"> from </strong><code class="markup--code markup--p-code"><strong class="markup--strong markup--p-strong">config.xml</strong></code><strong class="markup--strong markup--p-strong"> itself</strong>, the first step towards writing custom gradle files using config.xml itself. More info <a href="https://github.com/apache/cordova-android/pull/655"  class="markup--anchor markup--p-anchor" rel="noopener"    target="_blank">here</a></p><h4 name="5a8c" class="graf graf--h4 graf-after--p">ANDROID_HOME becomes ANDROID_SDK_ROOT</h4><p name="55c5" class="graf graf--p graf-after--h4">Android has migrated the ANDROID_HOME variable to ANDROID_SDK_ROOT. If you continue to use ANDROID_HOME, the following rules apply:</p><ul class="postList"><li name="2355" class="graf graf--li graf-after--p">If <code class="markup--code markup--li-code">ANDROID_HOME</code> is defined and contains a valid SDK installation, its value is used instead of the value in <code class="markup--code markup--li-code">ANDROID_SDK_ROOT</code>.</li><li name="2fc7" class="graf graf--li graf-after--li">If <code class="markup--code markup--li-code">ANDROID_HOME</code> is not defined, the value in <code class="markup--code markup--li-code">ANDROID_SDK_ROOT</code> is used.</li><li name="a3ba" class="graf graf--li graf-after--li">If <code class="markup--code markup--li-code">ANDROID_HOME</code> is defined but does not exist or does not contain a valid SDK installation, the value in <code class="markup--code markup--li-code">ANDROID_SDK_ROOT</code> is used instead.</li></ul><p name="a780" class="graf graf--p graf-after--li">Cordova 9.0 now supports ANDROID_SDK_ROOT variable, so that future releases do not break because of deprecated behavior of ANDROID_HOME</p><h4 name="7216" class="graf graf--h4 graf-after--p">Removed support for <code class="markup--code markup--h4-code">browserify</code></h4><p name="0384" class="graf graf--p graf-after--h4">Browsers don’t have the <code class="markup--code markup--p-code">require</code> method defined, but Node.js does. With <strong class="markup--strong markup--p-strong">Browserify</strong> you can write code that uses <code class="markup--code markup--p-code">require</code> in the same way that you would use it in Node.</p><p name="fb74" class="graf graf--p graf-after--p">Cordova 9.0.0 has removed support for browserify.</p><h4 name="bd18" class="graf graf--h4 graf-after--p">Added <code class="markup--code markup--h4-code">package-lock.json</code> to&nbsp;<code class="markup--code markup--h4-code">.gitignore</code></h4><p name="4e60" class="graf graf--p graf-after--h4">As you may be aware, <code class="markup--code markup--p-code">package-lock.json</code> is used to keep a log of installed modules and their dependencies. This file is generally committed to Git, so different members of a team can have same dependencies.</p><p name="8b8f" class="graf graf--p graf-after--p">Cordova 9.0.0 project will now add <code class="markup--code markup--p-code">package-lock.json</code> to&nbsp;<code class="markup--code markup--p-code">.gitIgnore</code> by default. Yayy?</p><h4 name="8f31" class="graf graf--h4 graf-after--p">Fix requirements error messages for JDK 8, and tell user Cordova needs JAVA 1.8&nbsp;only</h4><p name="673b" class="graf graf--p graf-after--h4">JAVA (JDK) has upgraded from 1.8 to v11, but still most of the users are using 1.8 itself (including me) because of the compatibility with Cordova. Recently, many projects starting seeing an error message to update to latest Java versions i.e. V11. But when you do update JAVA version, it results in another error. Apparently, this was because there is a syntactic difference in versioning. Earlier it was 1.8, from there it became v9, v10 and now v11. So the two digit version number started causing issues.</p><p name="fca1" class="graf graf--p graf-after--p">Cordova 9.0.0 has now fixed this, at least in the Android platform. The error messages now give out correct SDK download links, so user does not end up installing v11, and bang their head around on the walls. More info <a href="https://github.com/apache/cordova-android/issues/618"  class="markup--anchor markup--p-anchor" rel="noopener"    target="_blank">here</a></p><p name="21f1" class="graf graf--p graf-after--p">Along with this, now there is a check in Cordova to tell the user that only JAVA 1.8 will work with Cordova. So any JAVA version ≥ 9 will give this error which says “we need exactly Java 1.8”</p><h4 name="1c0c" class="graf graf--h4 graf-after--p">Resolved issue with plugin <code class="markup--code markup--h4-code">target-dir="app*"</code> subdirs</h4><p name="3e0a" class="graf graf--p graf-after--h4">This was a strange issue. Certain plugins use a folder structure where the folder structure contains <code class="markup--code markup--p-code">app*</code> keyword e.g. <code class="markup--code markup--p-code">de/applant/</code> These plugins were facing issues because the <code class="markup--code markup--p-code">app</code> part of the folder structure was conflicting with other <code class="markup--code markup--p-code">app</code> folders. Probably because of a <code class="markup--code markup--p-code">includes</code> check, rather than <code class="markup--code markup--p-code">startsWith</code> check. This issue had affected following plugins</p><ul class="postList"><li name="84e9" class="graf graf--li graf-after--p"><a href="https://github.com/katzer/cordova-plugin-local-notifications"  class="markup--anchor markup--li-anchor" rel="noopener" target="_blank">https://github.com/katzer/cordova-plugin-local-notifications</a>, with <code class="markup--code markup--li-code">target-dir="src/de/appplant/cordova/plugin/notification"</code></li><li name="cb3a" class="graf graf--li graf-after--li"><a href="https://github.com/katzer/cordova-plugin-badge"  class="markup--anchor markup--li-anchor" rel="noopener" target="_blank">https://github.com/katzer/cordova-plugin-badge</a>, with <code class="markup--code markup--li-code">target-dir="src/de/appplant/cordova/plugin/badge"</code></li><li name="cf00" class="graf graf--li graf-after--li"><a href="https://github.com/katzer/cordova-plugin-background-mode"  class="markup--anchor markup--li-anchor" rel="noopener" target="_blank">https://github.com/katzer/cordova-plugin-background-mode</a>, with <code class="markup--code markup--li-code">target-dir="src/de/appplant/cordova/plugin/background"</code></li><li name="c680" class="graf graf--li graf-after--li"><code class="markup--code markup--li-code">cordova-plugin-inappbrowser</code></li></ul><p name="35ce" class="graf graf--p graf-after--li">This issue is now fixed in Cordova 9.0.0. Aforementioned plugins will not be affected by the folder structure issue anymore</p><h4 name="f1fc" class="graf graf--h4 graf-after--p">Gradle Updates</h4><p name="7d92" class="graf graf--p graf-after--h4">Cordova 9.0.0 now defaults to a Gradle version &gt; 4.6.0. This means you’ll need to update your Gradle version if you upgrade to Cordova 9. This update is in line with <a href="https://developer.android.com/studio/releases/gradle-plugin#3-2-0"  class="markup--anchor markup--p-anchor" rel="noopener"    target="_blank">Android Gradle Plugin 3.2.0</a>. Several other deprecation issues are also fixed in Cordova 9.0 🎉</p><h4 name="b6c4" class="graf graf--h4 graf-after--p">Increase old plugin compatibility</h4><p name="50b3" class="graf graf--p graf-after--h4">This is a good news, considering with every Cordova version update, there used to be breaking changes for plugins. As I mentioned above, Android recently changed the folder structure, and hence Cordova did too. Cordova 9.0.0 has come up with a fix to increase compatibility of old plugins by adding ‘app/src/main’ to all plugin source-file tags that didn’t include it, so the files are copied to the new Android Studio structure. Pretty simple change, but can help developers a lot when using old plugins. (and also give plugin developers more time to make appropriate changes)</p><h4 name="487b" class="graf graf--h4 graf-after--p">Fix for plugins that use non-Java source files, such as&nbsp;Camera</h4><p name="1cb5" class="graf graf--p graf-after--h4">Cordova 9.0.0 has fixed an issue with plugins that used non-Java source files&#8202;—&#8202;when user removed and re-installed the plugin, the CLI gives error. Following is an example for Camera plugin.</p><figure tabindex="0" contenteditable="false" name="d6af" class="graf graf--figure graf-after--p is-defaultValue"><div class="aspectRatioPlaceholder is-locked" style="max-width: 686px; max-height: 370px;"><div class="aspectRatioPlaceholder-fill" style="padding-bottom: 53.900000000000006%;"></div><img class="graf-image" data-image-id="1*jgorHaiIScJrHC_AOIMqVA.png" data-width="686" data-height="370" src="https://cdn-images-1.medium.com/max/800/1*jgorHaiIScJrHC_AOIMqVA.png"><div class="crosshair u-ignoreBlock"></div></div></figure><p name="3a24" class="graf graf--p graf-after--figure">Now these plugins can be removed and installed again correctly.</p><h4 name="8eb5" class="graf graf--h4 graf-after--p">cdvStartInBackground=true now fires pause&nbsp;event</h4><p name="74f6" class="graf graf--p graf-after--h4">Earlier, the MainActivity created from the template that adds support for starting the app in the background via the <code class="markup--code markup--p-code">cdvStartInBackground</code> flag didn’t fire the pause event.</p><p name="4667" class="graf graf--p graf-after--p">This affected plugins like <code class="markup--code markup--p-code">phonegap-push-plugin</code> where users would like to wake up the app when app is in background. This allows the developer to avoid polling when app is in background.</p><p name="4f95" class="graf graf--p graf-after--p">Cordova 9.0.0 resolves the issue by caching a <code class="markup--code markup--p-code">pendingPause</code> when starting in the background, this manifests in the following events inside the app:</p><ul class="postList"><li name="a918" class="graf graf--li graf-after--p">pause</li><li name="2c9f" class="graf graf--li graf-after--li">deviceready</li></ul><p name="24e0" class="graf graf--p graf-after--li">As a user you can then store a flag (e.g. app.inBackground) and this can be checked in <code class="markup--code markup--p-code">deviceready</code> handler.</p><h3 name="94c9" class="graf graf--h3 graf-after--p">iOS Platform&nbsp;Changes</h3><figure tabindex="0" contenteditable="false" name="000e" class="graf graf--figure graf-after--h3 is-defaultValue"><div class="aspectRatioPlaceholder is-locked" style="max-width: 700px; max-height: 230px;"><div class="aspectRatioPlaceholder-fill" style="padding-bottom: 32.800000000000004%;"></div><img class="graf-image" data-image-id="1*sGO9j3uobDJeQRkGNHDs0w.jpeg" data-width="1436" data-height="471" src="https://cdn-images-1.medium.com/max/800/1*sGO9j3uobDJeQRkGNHDs0w.jpeg"><div class="crosshair u-ignoreBlock"></div></div></figure><h4 name="140e" class="graf graf--h4 graf-after--figure">Correct icon and splash&nbsp;names</h4><p name="f1b4" class="graf graf--p graf-after--h4">Cordova 9.0.0 (cordova-ios 5.0.0) has made changes to correct the icon and splash names as per iOS convention. Minor change, but important!</p><p name="5c5c" class="graf graf--p graf-after--p">E.g. <code class="markup--code markup--p-code">icon-small</code> becomes <code class="markup--code markup--p-code">icon-29</code>&nbsp;, <code class="markup--code markup--p-code">icon-small@2x</code> becomes <code class="markup--code markup--p-code">icon-29@2x</code> and so on</p><h4 name="5cbf" class="graf graf--h4 graf-after--p">Xcode 10&nbsp;support</h4><p name="26df" class="graf graf--p graf-after--h4">A few issues had started to come in regarding the state of Cordova projects on Xcode 10. This is a rough summary of the situation:</p><p name="8c3c" class="graf graf--p graf-after--p">Xcode 10 uses a new build system by default (previously available on an opt-in basis in Xcode 9). The <code class="markup--code markup--p-code">cordova-ios</code> project structure is not compatible with this new build system and results in failures. As of Sept, 2018, officially, Cordova did not claim to support Xcode 10.</p><p name="7db8" class="graf graf--p graf-after--p">An appropriate reaction from one developer</p><figure tabindex="0" contenteditable="false" name="2d66" class="graf graf--figure graf-after--p"><div class="aspectRatioPlaceholder is-locked" style="max-width: 700px; max-height: 296px;"><div class="aspectRatioPlaceholder-fill" style="padding-bottom: 42.4%;"></div><img class="graf-image" data-image-id="1*TlOZYp8916OBNsgNxkIl0g.png" data-width="706" data-height="299" src="https://cdn-images-1.medium.com/max/800/1*TlOZYp8916OBNsgNxkIl0g.png"><div class="crosshair u-ignoreBlock"></div></div><br/><figcaption class="imageCaption" contenteditable="true" data-default-value="Type caption for image (optional)">Apple 🙄</figcaption></figure><p name="bc44" class="graf graf--p graf-after--figure">The best workaround was to opt-out of the new build system:</p><ul class="postList"><li name="c01f" class="graf graf--li graf-after--p">If you’re building on the command-line, you can specify <code class="markup--code markup--li-code">--buildFlag="-UseModernBuildSystem=0"</code>:</li></ul><pre name="27dc" class="graf graf--pre graf-after--li"><code class="markup--code markup--pre-code"># Cordova CLI<br>cordova run ios --buildFlag='-UseModernBuildSystem=0'<br>cordova build ios --buildFlag='-UseModernBuildSystem=0'</code></pre><pre name="077f" class="graf graf--pre graf-after--pre"><code class="markup--code markup--pre-code"># Ionic CLI<br>ionic cordova run ios -- --buildFlag="-UseModernBuildSystem=0"<br>ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"</code></pre><ul class="postList"><li name="e316" class="graf graf--li graf-after--pre">If you are opening the project in the Xcode IDE, you need to change the build system in Workspace Settings to “Legacy Build System”</li></ul><p name="600c" class="graf graf--p graf-after--li">Cordova 9.0.0 has resolved this issue, and now cordova-ios structure should be compatible with XCode 10.</p><h4 name="f2b7" class="graf graf--h4 graf-after--p">Inputs type text don’t work on&nbsp;iOS</h4><p name="09b0" class="graf graf--p graf-after--h4">If you use the following preferences in <code class="markup--code markup--p-code">config.xml</code>, all the inputs type “text” stop working and are not clickable.</p><pre name="5081" class="graf graf--pre graf-after--p">&lt;preference name=”SuppressesLongPressGesture” value=”true” /&gt; &lt;preference name=”Suppresses3DTouchGesture” value=”true” /&gt;</pre><p name="931b" class="graf graf--p graf-after--pre">Cordova 9.0 has now fixed this issue. The <code class="markup--code markup--p-code">config.xml</code> preferences can be used without the input text side-effects</p><h4 name="c176" class="graf graf--h4 graf-after--p">Copy/Paste functionality not working for iOS native components</h4><p name="c60f" class="graf graf--p graf-after--h4">With iOS11 upgrade <code class="markup--code markup--p-code">cordova-ios</code> library is braking copy/paste functionality for consumer apps utilizing both web and native UI.</p><p name="90dc" class="graf graf--p graf-after--p">This happened when you copy text from a Native app e.g. Notes, and then try to paste it in a backgrounded cordova app. The text never gets pasted. This issue did not happen if the text is copied from a web interface.</p><p name="204e" class="graf graf--p graf-after--p">Also once consumer app goes foreground, after backgrounding that app, clipboard text can never be pasted in any other iOS app with native UI.</p><p name="ffd8" class="graf graf--p graf-after--p">This issue is resolved in cordova-ios 5.0.0. This was available a long time ago, but it is now default in Cordova 9.0.0</p><h3 name="e0f2" class="graf graf--h3 graf-after--p">Conclusion</h3><p name="4765" class="graf graf--p graf-after--h3">You saw some major changes in Cordova 9.0.0 i.e. Cordova-android 8.0.0 and cordova-ios 5.0.0. There are a lot of other minor changes in Cordova 9.0.0, but listing all of them here is not possible, and some of them are pretty harmless. Overall, in terms of plugin changes, the news is more on positive side. Several plugin issues have been fixed, and I personally look forward to more smoother iOS builds (but can’t trust Apple with more iOS changes 😑)</p><h3 name="97dc" class="graf graf--h3 graf-after--p">Next Steps</h3><p name="178a" class="graf graf--p graf-after--h3">Now that you have learned the latest changes in Cordova 9.0.0, you can go ahead and create some awesome Ionic 4 apps. Some of my articles you can start with</p><ul class="postList"><li name="9f48" class="graf graf--li graf-after--p"><a href="https://enappd.com/blog/ionic-4-paypal-payment-integration-for-apps-and-pwa/16"  class="markup--anchor markup--li-anchor" rel="nofollow noopener noopener noopener noopener noopener noopener noopener"    target="_blank">Ionic 4 PayPal payment integration&#8202;—&#8202;for Apps and PWA</a></li><li name="aa95" class="graf graf--li graf-after--li"><a href="https://enappd.com/blog/ionic-4-stripe-payment-integration-with-firebase-for-apps-and-pwa/17"  class="markup--anchor markup--li-anchor" rel="nofollow noopener noopener noopener noopener noopener noopener noopener"    target="_blank">Ionic 4 Stripe payment integration&#8202;—&#8202;for Apps and PWA</a></li><li name="fc67" class="graf graf--li graf-after--li"><a href="https://enappd.com/blog/how-to-integrate-apple-pay-in-ionic-4-apps/21"  class="markup--anchor markup--li-anchor" rel="nofollow noopener noopener noopener noopener noopener noopener noopener"    target="_blank">Ionic 4 Apple Pay integration</a></li><li name="b1fc" class="graf graf--li graf-after--li"><a href="https://enappd.com/blog/twitter-login-in-ionic-4-apps-using-firebase/24"  class="markup--anchor markup--li-anchor" rel="noopener"    target="_blank">Twitter login in Ionic 4 with Firebase</a></li><li name="57fe" class="graf graf--li graf-after--li is-selected"><a href="https://enappd.com/blog/facebook-login-in-ionic-4-apps-using-firebase/25"  class="markup--anchor markup--li-anchor" rel="noopener"    target="_blank">Facebook login in Ionic 4 with Firebase</a></li><li name="97f4" class="graf graf--li graf-after--li"><a href="https://medium.com/enappd/using-geolocation-and-beacon-plugins-in-ionic-4-754b41304007"  class="markup--anchor markup--li-anchor"    target="_blank">Geolocation</a> in Ionic 4</li><li name="34a6" class="graf graf--li graf-after--li"><a href="https://medium.com/enappd/qr-code-scanning-and-optical-character-recognition-ocr-in-ionic-4-95fd46be91dd"  class="markup--anchor markup--li-anchor"    target="_blank">QR Code and scanners</a> in Ionic 4 and</li><li name="de81" class="graf graf--li graf-after--li"><a href="https://medium.com/enappd/how-to-translate-in-ionic-4-globalization-internationalization-and-localization-31ec5807a8bc"  class="markup--anchor markup--li-anchor"    target="_blank">Translations in Ionic 4</a></li></ul><p name="2930" class="graf graf--p graf-after--li">If you need a base to start your next Ionic 4 app, you can make your next awesome app using <a href="https://store.enappd.com/product/ionic-4-full-app/"  class="markup--anchor markup--p-anchor" rel="noopener nofollow noopener noopener nofollow noopener noopener nofollow noopener noopener noopener noopener noopener noopener noopener"    target="_blank">Ionic 4 Full App</a>. I have my own Ionic 4 template store at <a href="http://enappd.com"  class="markup--anchor markup--p-anchor" rel="noopener"    target="_blank">enappd.com</a>. Feel free to visit and give your valuable feedback!</p><figure tabindex="0" contenteditable="false" name="89dc" class="graf graf--figure graf-after--p"><div class="aspectRatioPlaceholder is-locked" style="max-width: 700px; max-height: 442px;"><div class="aspectRatioPlaceholder-fill" style="padding-bottom: 63.2%;"></div><img class="graf-image" data-image-id="1*2BzL8TesnBHuazHr3VA4SQ.jpeg" data-width="760" data-height="480" src="https://cdn-images-1.medium.com/max/800/1*2BzL8TesnBHuazHr3VA4SQ.jpeg"><div class="crosshair u-ignoreBlock"></div></div><br/><figcaption class="imageCaption" contenteditable="true" data-default-value="Type caption for image (optional)">Use Ionic 4 Full app template for your next awesome&nbsp;app</figcaption></figure><h3 name="d3b9" class="graf graf--h3 graf-after--figure">References</h3><div name="cdbd" class="graf graf--mixtapeEmbed graf-after--h3"><a href="https://github.com/apache/cordova-ios/blob/master/RELEASENOTES.md"  class="markup--anchor markup--mixtapeEmbed-anchor" title="https://github.com/apache/cordova-ios/blob/master/RELEASENOTES.md"   ><strong class="markup--strong markup--mixtapeEmbed-strong">apache/cordova-ios</strong><br><em class="markup--em markup--mixtapeEmbed-em">Apache Cordova iOS. Contribute to apache/cordova-ios development by creating an account on GitHub.</em>github.com</a><a href="https://github.com/apache/cordova-ios/blob/master/RELEASENOTES.md" class="js-mixtapeImage mixtapeImage u-ignoreBlock" data-media-id="a3abf166aa18e44eccbac9047763f05f" data-thumbnail-img-id="0*2L-ISqQh_LMFkSn2" style="background-image: url(https://cdn-images-1.medium.com/fit/c/160/160/0*2L-ISqQh_LMFkSn2);"></a></div><div name="a44e" class="graf graf--mixtapeEmbed graf-after--mixtapeEmbed"><a href="https://github.com/apache/cordova-cli/blob/master/RELEASENOTES.md"  class="markup--anchor markup--mixtapeEmbed-anchor" title="https://github.com/apache/cordova-cli/blob/master/RELEASENOTES.md"   ><strong class="markup--strong markup--mixtapeEmbed-strong">apache/cordova-cli</strong><br><em class="markup--em markup--mixtapeEmbed-em">Apache Cordova CLI. Contribute to apache/cordova-cli development by creating an account on GitHub.</em>github.com</a><a href="https://github.com/apache/cordova-cli/blob/master/RELEASENOTES.md" class="js-mixtapeImage mixtapeImage u-ignoreBlock" data-media-id="165b315e94d08a3541b429e6ca94d6ef" data-thumbnail-img-id="0*NwdXTfGe6Lc7fgPS" style="background-image: url(https://cdn-images-1.medium.com/fit/c/160/160/0*NwdXTfGe6Lc7fgPS);"></a></div><div name="8e5c" class="graf graf--mixtapeEmbed graf-after--mixtapeEmbed"><a href="https://github.com/apache/cordova-android/blob/master/RELEASENOTES.md"  class="markup--anchor markup--mixtapeEmbed-anchor" title="https://github.com/apache/cordova-android/blob/master/RELEASENOTES.md"   ><strong class="markup--strong markup--mixtapeEmbed-strong">apache/cordova-android</strong><br><em class="markup--em markup--mixtapeEmbed-em">Apache Cordova Android. Contribute to apache/cordova-android development by creating an account on GitHub.</em>github.com</a><a href="https://github.com/apache/cordova-android/blob/master/RELEASENOTES.md" class="js-mixtapeImage mixtapeImage u-ignoreBlock" data-media-id="c0d7f1d847034b228c017a45256355ad" data-thumbnail-img-id="0*QPDZcqI0Se6erHVc" style="background-image: url(https://cdn-images-1.medium.com/fit/c/160/160/0*QPDZcqI0Se6erHVc);"></a></div><p name="6d66" class="graf graf--p graf-after--mixtapeEmbed graf--trailing">This blog was originally published on <a href="http://enappd.com"  class="markup--anchor markup--p-anchor" rel="noopener"    target="_blank">enappd.com</a>.</p></div></div></section></div></article></main>