| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="utf-8"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| <meta name="format-detection" content="telephone=no"> |
| <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" /> |
| <meta name="description" content="How to manage platforms and Cordova CLI versions. "> |
| |
| <title> |
| |
| |
| Platforms and Plugins Version Management - Apache Cordova |
| |
| |
| </title> |
| |
| <link rel="SHORTCUT ICON" href="/favicon.ico"/> |
| |
| |
| |
| |
| |
| |
| <link rel="canonical" href="https://cordova.apache.org/docs/en/8.x/platform_plugin_versioning_ref/"> |
| |
| <!-- CSS --> |
| <link rel="stylesheet" type="text/css" href="/static/css/main.css"> |
| <link rel="stylesheet" type="text/css" href="/static/css/lib/syntax.css"> |
| |
| <!-- Fonts --> |
| <!-- For attribution information, see www/attributions.html --> |
| <link href='https://fonts.googleapis.com/css?family=Raleway:700,400,300,700italic,400italic,300italic' rel='stylesheet' type='text/css'> |
| |
| <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> |
| <!--[if lt IE 9]> |
| <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> |
| <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript"> |
| var disqus_developer = 1; // this would set it to developer mode |
| </script> |
| |
| <!-- JS --> |
| <script defer type="text/javascript" src="/static/js/lib/jquery-2.1.1.min.js"></script> |
| <script defer type="text/javascript" src="/static/js/lib/bootstrap.min.js"></script> |
| |
| <!-- Matomo --> |
| <script> |
| var _paq = window._paq = window._paq || []; |
| /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ |
| _paq.push(['trackPageView']); |
| _paq.push(['enableLinkTracking']); |
| (function() { |
| var u="https://analytics.apache.org/"; |
| _paq.push(['setTrackerUrl', u+'matomo.php']); |
| _paq.push(['setSiteId', '16']); |
| var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; |
| g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); |
| })(); |
| </script> |
| <!-- End Matomo Code --> |
| |
| |
| </head> |
| |
| <body> |
| <header> |
| <a class="scroll-point pt-top" name="top"></a> |
| <nav class="navbar navbar-inverse navbar-fixed-top"> |
| <div class="container-fluid"> |
| <div class="navbar-header"> |
| <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> |
| <span class="sr-only">Toggle navigation</span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| </button> |
| <a class="navbar-brand" href="/"><img id="logo_top" src="/static/img/cordova-logo-newbrand.svg"/></a> |
| </div> |
| <div id="navbar" class="navbar-collapse collapse"> |
| <div class="nav_bar_center"> |
| <ul class="nav navbar-nav"> |
| <li class="active"> |
| <a href="/docs/en/latest/">Documentation</a> |
| </li> |
| <li > |
| <a href="/plugins">Plugins</a> |
| </li> |
| <li > |
| <a href="/blog" id="blog_button">Blog<span class="badge" id="new_blog_count"></span></a> |
| </li> |
| <li > |
| <a href="/contribute">Contribute</a> |
| </li> |
| <li > |
| <a href="/contribute/team.html">Team</a> |
| </li> |
| <li> |
| <a href="/#getstarted">Get Started</a> |
| </li> |
| <li> |
| <form class="navbar-form navbar-right" id="header-search-form" role="search"> |
| <div class="input-group"> |
| |
| </div> |
| </form> |
| </li> |
| </ul> |
| </div> |
| </div><!--/.navbar-collapse --> |
| </div> |
| </nav> |
| <div id="_fixed_navbar_spacer" style="padding-top:50px"></div> |
| </header> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="docs"> |
| |
| <!-- Table of Contents --> |
| <div class="hidden-xs hidden-sm site-toc-container"> |
| <ul class="site-toc"> |
| |
| |
| <li> |
| |
| <span class="toc-section-heading"> |
| Introduction |
| </span> |
| |
| |
| |
| |
| |
| |
| <ul class="site-toc"> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/overview/index.html"> |
| Overview |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <span class="toc-section-heading"> |
| Create apps |
| </span> |
| |
| |
| |
| |
| |
| |
| <ul class="site-toc"> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/cli/index.html"> |
| Create your first app |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/cli/template.html"> |
| Templates for apps |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/support/index.html"> |
| Platform support |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <span class="toc-section-heading"> |
| Develop for platforms |
| </span> |
| |
| |
| |
| |
| |
| |
| <ul class="site-toc"> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/platforms/android/index.html"> |
| Android |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/platforms/ios/index.html"> |
| iOS |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/platforms/windows/index.html"> |
| Windows |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/platforms/osx/index.html"> |
| OS X |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/platform_plugin_versioning_ref/index.html"> |
| Manage versions and platforms |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/config_ref/images.html"> |
| Customize icons |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/cordova/storage/storage.html"> |
| Store data |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/appdev/privacy/index.html"> |
| Manage privacy |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/appdev/security/index.html"> |
| Manage security |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/appdev/whitelist/index.html"> |
| Whitelisting |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <span class="toc-section-heading"> |
| Create plugins |
| </span> |
| |
| |
| |
| |
| |
| |
| <ul class="site-toc"> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/hybrid/plugins/index.html"> |
| Create a plugin |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <span class="toc-section-heading"> |
| Develop for platforms |
| </span> |
| |
| |
| |
| |
| |
| |
| <ul class="site-toc"> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/platforms/android/plugin.html"> |
| Android |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/platforms/ios/plugin.html"> |
| iOS |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/platforms/windows/plugin.html"> |
| Windows |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/plugin_ref/plugman.html"> |
| Use Plugman |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <span class="toc-section-heading"> |
| Advanced Topics |
| </span> |
| |
| |
| |
| |
| |
| |
| <ul class="site-toc"> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/hybrid/webviews/index.html"> |
| Embed Cordova in native apps |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/next/index.html"> |
| Next Steps |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <span class="toc-section-heading"> |
| Reference |
| </span> |
| |
| |
| |
| |
| |
| |
| <ul class="site-toc"> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/config_ref/index.html"> |
| Config.xml |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/cordova/events/events.html"> |
| Events |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-cli/index.html"> |
| CLI Reference |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/guide/appdev/hooks/index.html"> |
| Hooks |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/plugin_ref/spec.html"> |
| Plugin.xml |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <span class="toc-section-heading"> |
| Plugin APIs |
| </span> |
| |
| |
| |
| |
| |
| |
| <ul class="site-toc"> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-battery-status/index.html"> |
| Battery Status |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-camera/index.html"> |
| Camera |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-device/index.html"> |
| Device |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-dialogs/index.html"> |
| Dialogs |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-file/index.html"> |
| File |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-geolocation/index.html"> |
| Geolocation |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-inappbrowser/index.html"> |
| Inappbrowser |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-media/index.html"> |
| Media |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-media-capture/index.html"> |
| Media Capture |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-network-information/index.html"> |
| Network Information |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-screen-orientation/index.html"> |
| Screen Orientation |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-splashscreen/index.html"> |
| Splashscreen |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-statusbar/index.html"> |
| Statusbar |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-vibration/index.html"> |
| Vibration |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| |
| <li> |
| |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-whitelist/index.html"> |
| Whitelist |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| </li> |
| |
| </ul> |
| |
| </div> |
| |
| <!-- Page content --> |
| <div class="page-content-container"> |
| <div class="page-content"> |
| <div class="content-header"> |
| |
| <!-- ToC Dropdown (for XS and SM sizes only) --> |
| <div class="toc-dropdown dropdown visible-xs-block visible-sm-block"> |
| <button class="btn btn-default dropdown-toggle" type="button" id="tocDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> |
| Table of Contents |
| <span class="caret"></span> |
| </button> |
| <ul class="dropdown-menu"> |
| |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/overview/index.html"> |
| Overview |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/cli/index.html"> |
| Create your first app |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/cli/template.html"> |
| Templates for apps |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/support/index.html"> |
| Platform support |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/platforms/android/index.html"> |
| Android |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/platforms/ios/index.html"> |
| iOS |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/platforms/windows/index.html"> |
| Windows |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/platforms/osx/index.html"> |
| OS X |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/platform_plugin_versioning_ref/index.html"> |
| Manage versions and platforms |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/config_ref/images.html"> |
| Customize icons |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/cordova/storage/storage.html"> |
| Store data |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/appdev/privacy/index.html"> |
| Manage privacy |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/appdev/security/index.html"> |
| Manage security |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/appdev/whitelist/index.html"> |
| Whitelisting |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/hybrid/plugins/index.html"> |
| Create a plugin |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/platforms/android/plugin.html"> |
| Android |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/platforms/ios/plugin.html"> |
| iOS |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/platforms/windows/plugin.html"> |
| Windows |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/plugin_ref/plugman.html"> |
| Use Plugman |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/hybrid/webviews/index.html"> |
| Embed Cordova in native apps |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/next/index.html"> |
| Next Steps |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/config_ref/index.html"> |
| Config.xml |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/cordova/events/events.html"> |
| Events |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-cli/index.html"> |
| CLI Reference |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/guide/appdev/hooks/index.html"> |
| Hooks |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/plugin_ref/spec.html"> |
| Plugin.xml |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-battery-status/index.html"> |
| Battery Status |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-camera/index.html"> |
| Camera |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-device/index.html"> |
| Device |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-dialogs/index.html"> |
| Dialogs |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-file/index.html"> |
| File |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-geolocation/index.html"> |
| Geolocation |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-inappbrowser/index.html"> |
| Inappbrowser |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-media/index.html"> |
| Media |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-media-capture/index.html"> |
| Media Capture |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-network-information/index.html"> |
| Network Information |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-screen-orientation/index.html"> |
| Screen Orientation |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-splashscreen/index.html"> |
| Splashscreen |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-statusbar/index.html"> |
| Statusbar |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-vibration/index.html"> |
| Vibration |
| </a> |
| </li> |
| |
| |
| |
| |
| <li> |
| <a class="" href="/docs/en/8.x/reference/cordova-plugin-whitelist/index.html"> |
| Whitelist |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| </ul> |
| </div> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a class="edit" href="https://github.com/apache/cordova-docs/tree/master/www/docs/en/8.x/platform_plugin_versioning_ref/index.md"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> </a> |
| |
| |
| |
| <!-- Version dropdown --> |
| <div class="dropdown"> |
| <button class="btn btn-default dropdown-toggle" type="button" id="versionDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> |
| 8.x |
| |
| <span class="caret"></span> |
| </button> |
| <ul class="dropdown-menu" aria-labelledby="versionDropdown"> |
| |
| <!-- List versions available in this language --> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/dev/" class="missing-page"> |
| |
| |
| dev |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/latest/" class="missing-page"> |
| |
| |
| 12.x |
| |
| (Latest) |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/11.x/" class="missing-page"> |
| |
| |
| 11.x |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/10.x/" class="missing-page"> |
| |
| |
| 10.x |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/9.x/" class="missing-page"> |
| |
| |
| 9.x |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/8.x/" class="missing-page"> |
| |
| <span class="selected"> |
| |
| 8.x |
| |
| |
| </span> |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/7.x/" class="missing-page"> |
| |
| |
| 7.x |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/6.x/" class="missing-page"> |
| |
| |
| 6.x |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/5.4.0/" class="missing-page"> |
| |
| |
| 5.4.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/5.1.1/" class="missing-page"> |
| |
| |
| 5.1.1 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/5.0.0/" class="missing-page"> |
| |
| |
| 5.0.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/4.0.0/" class="missing-page"> |
| |
| |
| 4.0.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/3.6.0/" class="missing-page"> |
| |
| |
| 3.6.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/3.5.0/" class="missing-page"> |
| |
| |
| 3.5.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/3.4.0/" class="missing-page"> |
| |
| |
| 3.4.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/3.3.0/" class="missing-page"> |
| |
| |
| 3.3.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/3.2.0/" class="missing-page"> |
| |
| |
| 3.2.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/3.1.0/" class="missing-page"> |
| |
| |
| 3.1.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/3.0.0/" class="missing-page"> |
| |
| |
| 3.0.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/2.9.0/" class="missing-page"> |
| |
| |
| 2.9.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/2.8.0/" class="missing-page"> |
| |
| |
| 2.8.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/2.7.0/" class="missing-page"> |
| |
| |
| 2.7.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/2.6.0/" class="missing-page"> |
| |
| |
| 2.6.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/2.5.0/" class="missing-page"> |
| |
| |
| 2.5.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/2.4.0/" class="missing-page"> |
| |
| |
| 2.4.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/2.3.0/" class="missing-page"> |
| |
| |
| 2.3.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/2.2.0/" class="missing-page"> |
| |
| |
| 2.2.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/2.1.0/" class="missing-page"> |
| |
| |
| 2.1.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/2.0.0/" class="missing-page"> |
| |
| |
| 2.0.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/1.9.0/" class="missing-page"> |
| |
| |
| 1.9.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/1.8.1/" class="missing-page"> |
| |
| |
| 1.8.1 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/1.8.0/" class="missing-page"> |
| |
| |
| 1.8.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/1.7.0/" class="missing-page"> |
| |
| |
| 1.7.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/1.6.1/" class="missing-page"> |
| |
| |
| 1.6.1 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/1.6.0/" class="missing-page"> |
| |
| |
| 1.6.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="/docs/en/1.5.0/" class="missing-page"> |
| |
| |
| 1.5.0 |
| |
| |
| |
| </a> |
| </li> |
| |
| </ul> |
| </div> |
| </div> |
| |
| |
| |
| |
| |
| |
| |
| |
| <!-- Show warnings for special versions --> |
| <!-- dev warning --> |
| |
| |
| <!-- outdated warning --> |
| |
| <div class="alert docs-alert alert-danger" role="alert"> |
| <button type="button" class="close" data-dismiss="alert" aria-label="Close"> |
| <span aria-hidden="true">×</span> |
| </button> |
| This version of the documentation is outdated! |
| <a href="/docs/en/latest/"> |
| Click here for the latest released version. |
| </a> |
| </div> |
| |
| |
| <!-- plugin version warning --> |
| |
| |
| <div id="page-toc-source"> |
| <h1>Platforms and Plugins Version Management</h1> |
| <p>From version 4.3.0 onwards, Cordova provides the ability to save and restore platforms and plugins.</p> |
| |
| <p>This feature allows developers to save and restore their app to a known state without having to check in all of the platform and plugin source code.</p> |
| |
| <p>When adding a platform or plugin, details about the app's platform and plugin versions are automatically saved in config.xml and package.json. It is possible to add a platform or plugin by editing package.json or config.xml directly, assuming you know the right tags + syntax. It is not possible to remove plugins or platforms in this manner. The recommended method of adding and removing plugins and platforms is with the command line cordova commands <code>cordova plugin add|remove ...</code> and <code>cordova platform add|remove ...</code> to avoid any out of sync issues.</p> |
| |
| <p>The 'restore' step happens automatically when a <strong>'cordova prepare'</strong> is issued, making use of information previously saved in the config.xml and package.json files.</p> |
| |
| <p>One scenario where save/restore capabilities come in handy is in large teams that work on an app, with each team member focusing on a platform or plugin. This feature makes it easier to share the project and reduce the amount of redundant code that is checked in the repository.</p> |
| |
| <h2>Platform Versioning</h2> |
| |
| <h3>Saving platforms</h3> |
| <p>To save a platform, you issue the following command :</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>cordova platform add <platform[@<version>] | directory | git_url> |
| </code></pre></div></div> |
| |
| <p>After running the above command, the resulting config.xml looks like :</p> |
| |
| <div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><?xml version='1.0' encoding='utf-8'?></span> |
| ... |
| <span class="nt"><engine</span> <span class="na">name=</span><span class="s">"android"</span> <span class="na">spec=</span><span class="s">"~4.0.0"</span> <span class="nt">/></span> |
| ... |
| <span class="nt"></xml></span> |
| </code></pre></div></div> |
| <p>After running the above command, the resulting package.json looks like :</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="s2">"cordova"</span>: <span class="o">{</span><span class="s2">"platforms"</span>: <span class="o">[</span><span class="s2">"android"</span><span class="o">]}</span>,<span class="s2">"dependencies"</span>: <span class="o">{</span><span class="s2">"cordova-android"</span>: <span class="s2">"^4.0.0"</span><span class="o">}</span> |
| </code></pre></div></div> |
| <p>The '--nosave' flag prevents adding and deleting specified platforms from config.xml and package.json. To prevent saving a platform, you issue the following command :</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>cordova platform add <platform[@<version>] | directory | git_url> <span class="nt">--nosave</span> |
| </code></pre></div></div> |
| |
| <p>Some examples :</p> |
| |
| <ul> |
| <li><strong>'cordova platform add android'</strong> => retrieves the pinned version of the android platform, adds it to the project and then updates config.xml and package.json.</li> |
| <li><strong>'cordova platform add android@3.7.0'</strong> => retrieves the android platform, version 3.7.0 from npm, adds it to the project and then updates config.xml and package.json.</li> |
| <li><strong>'cordova platform add https://github.com/apache/cordova-android.git'</strong> => npm installs the specified cordova-android from the git repository, adds the android platform to the project, then updates config.xml and package.json and points its version to the specified git-url.</li> |
| <li><strong>'cordova platform add C:/path/to/android/platform'</strong> => retrieves the android platform from the specified directory, adds it to the project, then updates config.xml and package.json and points to the directory.</li> |
| <li><strong>'cordova platform add android --nosave'</strong> => retrieves the pinned version of the android platform, adds it to the project, but does not add it to config.xml or package.json.</li> |
| <li><strong>'cordova platform remove android --nosave'</strong> => removes the android platform from the project, but does not remove it from config.xml or package.json.</li> |
| </ul> |
| |
| <h3>Mass saving platforms on an existing project</h3> |
| <p>If you have a pre-existing project and you want to save all the currently added platforms in your project, you can use :</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>cordova platform save |
| </code></pre></div></div> |
| |
| <h3>Updating / Removing platforms</h3> |
| <p>It is also possible to update/delete from config.xml and package.json during the commands 'cordova platform update' and 'cordova platform remove' :</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>cordova platform update <platform[@<version>] | directory | git_url> <span class="nt">--save</span> |
| <span class="nv">$ </span>cordova platform remove <platform> |
| </code></pre></div></div> |
| |
| <p>Some examples :</p> |
| |
| <ul> |
| <li><strong>'cordova platform update android --save'</strong> => In addition to updating the android platform to the pinned version, update config.xml entry</li> |
| <li><strong>'cordova platform update android@3.8.0 --save'</strong> => In addition to updating the android platform to version 3.8.0, update config.xml entry</li> |
| <li><strong>'cordova platform update /path/to/android/platform --save'</strong> => In addition to updating the android platform to version in the folder, update config.xml entry</li> |
| <li><strong>'cordova platform remove android'</strong> => Removes the android platform from the project and deletes its entry from config.xml and package.json.</li> |
| </ul> |
| |
| <h3>Restoring platforms</h3> |
| |
| <p>Platforms are automatically restored from package.json and config.xml when the <strong>'cordova prepare'</strong> command is run. After prepare is run, package.json and config.xml should contain identical platforms and versions.</p> |
| |
| <p>If you add a platform without specifying a version/folder/git_url, the version to install is taken from package.json or config.xml, <strong>if found</strong>. In case of conflicts, package.json is given precedence over config.xml.</p> |
| |
| <p>Example:</p> |
| |
| <p>Suppose your config.xml file contains the following entry:</p> |
| |
| <div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><?xml version='1.0' encoding='utf-8'?></span> |
| ... |
| <span class="nt"><engine</span> <span class="na">name=</span><span class="s">"android"</span> <span class="na">spec=</span><span class="s">"3.7.0"</span> <span class="nt">/></span> |
| ... |
| <span class="nt"></xml></span> |
| </code></pre></div></div> |
| |
| <p>If you run the command <strong>'cordova platform add android'</strong> (no version/folder/git_url specified), the platform 'android@3.7.0' (as retrieved from config.xml) will be installed.</p> |
| |
| <p><strong>Example for order of precedence for restoring platforms:</strong></p> |
| |
| <p>Suppose your config.xml has this platform and version:</p> |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><engine <span class="nv">name</span><span class="o">=</span><span class="s2">"android"</span> <span class="nv">spec</span><span class="o">=</span>“1.0.0” /> |
| </code></pre></div></div> |
| |
| <p>Suppose your package.json has this platform and version:</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="s2">"cordova"</span>: <span class="o">{</span><span class="s2">"platforms"</span>: <span class="o">[</span><span class="s2">"android"</span><span class="o">]}</span>,<span class="s2">"dependencies"</span>: <span class="o">{</span><span class="s2">"cordova-android"</span>: <span class="s2">"4.0.0"</span><span class="o">}</span> |
| </code></pre></div></div> |
| |
| <p>When prepare is run, package.json’s contents are giving precedence and both config.xml and package.json are updated so that they have identical platforms and variables. Notice how package.json's version (4.0.0) has <strong>replaced</strong> config.xml's version (1.0.0).</p> |
| |
| <p>After running <strong>'cordova prepare'</strong> , the resulting config.xml looks like :</p> |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><engine <span class="nv">name</span><span class="o">=</span><span class="s2">"android"</span> <span class="nv">spec</span><span class="o">=</span>“4.0.0” /> |
| </code></pre></div></div> |
| |
| <p>After running <strong>'cordova prepare'</strong> , the resulting package.json looks like :</p> |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="s2">"cordova"</span>: <span class="o">{</span><span class="s2">"platforms"</span>: <span class="o">[</span><span class="s2">"android"</span>,]<span class="o">}</span>,<span class="s2">"dependencies"</span>: <span class="o">{</span><span class="s2">"cordova-android"</span>: <span class="s2">"4.0.0"</span><span class="o">}</span> |
| </code></pre></div></div> |
| <hr /> |
| |
| <h2>Plugin Versioning</h2> |
| <p><em>(The plugin commands are a mirror of the platform commands)</em></p> |
| |
| <h3>Saving plugins</h3> |
| <p>To save a plugin, you issue the following command :</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>cordova plugin add <plugin[@<version>] | directory | git_url> |
| </code></pre></div></div> |
| |
| <p>After running the above command, the resulting config.xml looks like :</p> |
| |
| <div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><?xml version='1.0' encoding='utf-8'?></span> |
| ... |
| <span class="nt"><plugin</span> <span class="na">name=</span><span class="s">"cordova-plugin-console"</span> <span class="na">spec=</span><span class="s">"~1.0.0"</span> <span class="nt">/></span> |
| ... |
| <span class="nt"></xml></span> |
| </code></pre></div></div> |
| |
| <p>After running the above command, the resulting package.json looks like :</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="s2">"cordova"</span>: <span class="o">{</span><span class="s2">"plugins"</span>: <span class="o">[</span><span class="s2">"cordova-plugin-console"</span><span class="o">]}</span>,<span class="s2">"dependencies"</span>: <span class="o">{</span><span class="s2">"cordova-plugin-console"</span>: <span class="s2">"^1.0.0"</span><span class="o">}</span> |
| </code></pre></div></div> |
| |
| <p>The '--nosave' flag prevents adding and deleting specified plugins from config.xml and package.json. To prevent saving a plugin, you issue the following command :</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>cordova plugin add <plugin[@<version>] | directory | git_url> <span class="nt">--nosave</span> |
| </code></pre></div></div> |
| |
| <p>Some examples :</p> |
| |
| <ul> |
| <li><strong>'cordova plugin add cordova-plugin-console'</strong> => retrieves the pinned version of the console plugin, adds it to the project and then updates config.xml and package.json.</li> |
| <li><strong>'cordova plugin add cordova-plugin-console@0.2.13'</strong> => retrieves the android plugin, version 0.2.13 from npm, adds it to the project and then updates config.xml and package.json.</li> |
| <li><strong>'cordova plugin add https://github.com/apache/cordova-plugin-console.git'</strong> => npm installs specified console plugin from the git repository, adds the console plugin to the project, then updates config.xml and and package.json and points its version to the specified git-url.</li> |
| <li><strong>'cordova plugin add C:/path/to/console/plugin'</strong> => retrieves the console plugin from the specified directory, adds it to the project, then updates config.xml and package.json and points to the directory.</li> |
| </ul> |
| |
| <h3>Mass saving plugins on an existing project</h3> |
| <p>If you have a pre-existing project and you want to save all currently added plugins in the project, you can use :</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>cordova plugin save |
| </code></pre></div></div> |
| |
| <h3>Removing plugins</h3> |
| <p>It is also possible to delete from config.xml and package.json during the command 'cordova plugin remove' :</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>cordova plugin remove <plugin> |
| </code></pre></div></div> |
| <p>For example:</p> |
| |
| <ul> |
| <li><strong>'cordova plugin remove cordova-plugin-console'</strong> => Removes the console plugin from the project and deletes its entry from config.xml and package.json.</li> |
| </ul> |
| |
| <h3>Restoring plugins</h3> |
| |
| <p>Plugins are automatically restored from package.json and config.xml when the <strong>'cordova prepare'</strong> command is run. After prepare is run, package.json and config.xml should contain identical plugins and versions.</p> |
| |
| <p>If you add a plugin without specifying a version/folder/git_url, the version to install is taken from package.json or config.xml, <strong>if found</strong>. In case of conflicts, package.json is given precedence over config.xml.</p> |
| |
| <p>Example:</p> |
| |
| <p>Suppose your config.xml file contains the following entry:</p> |
| |
| <div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><?xml version='1.0' encoding='utf-8'?></span> |
| ... |
| <span class="nt"><plugin</span> <span class="na">name=</span><span class="s">"cordova-plugin-console"</span> <span class="na">spec=</span><span class="s">"0.2.11"</span> <span class="nt">/></span> |
| ... |
| <span class="nt"></ xml></span> |
| </code></pre></div></div> |
| |
| <p>If you run the command <strong>'cordova plugin add cordova-plugin-console'</strong> (no version/folder/git_url specified), the plugin 'cordova-plugin-console@0.2.11' (as retrieved from config.xml) will be installed.</p> |
| |
| <p><strong>Example for order of precedence for restoring plugins:</strong></p> |
| |
| <p>Supposed your config.xml has this plugin and version:</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><plugin <span class="nv">name</span><span class="o">=</span><span class="s2">"cordova-plugin-splashscreen"</span>/> |
| </code></pre></div></div> |
| <p>Suppose your package.json has this plugin and version:</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="s2">"cordova"</span>: <span class="o">{</span><span class="s2">"plugins"</span>: <span class="o">{</span><span class="s2">"cordova-plugin-splashscreen"</span> : <span class="o">{}</span> <span class="o">}</span> <span class="o">}</span>,<span class="s2">"dependencies"</span>: <span class="o">{</span><span class="s2">"cordova-plugin-splashscreen"</span>: <span class="s2">"1.0.0"</span><span class="o">}</span> |
| </code></pre></div></div> |
| <p>When prepare is run, package.json’s contents are giving precedence and both config.xml and package.json are updated so that they have identical plugins and variables. Notice how package.json's version (1.0.0) is now in config.xml.</p> |
| |
| <p>After running <strong>'cordova prepare'</strong> , the resulting config.xml looks like :</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><plugin <span class="nv">name</span><span class="o">=</span><span class="s2">"cordova-plugin-splashscreen"</span> <span class="nv">spec</span><span class="o">=</span><span class="s2">"1.0.0"</span>/> |
| </code></pre></div></div> |
| |
| <p>After running <strong>'cordova prepare'</strong> , the resulting package.json looks like :</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="s2">"cordova"</span>: <span class="o">{</span><span class="s2">"plugins"</span>: <span class="o">{</span><span class="s2">"cordova-plugin-splashscreen"</span> : <span class="o">{}</span> <span class="o">}</span> <span class="o">}</span>,<span class="s2">"dependencies"</span>: <span class="o">{</span><span class="s2">"cordova-plugin-splashscreen"</span>: <span class="s2">"1.0.0"</span><span class="o">}</span> |
| </code></pre></div></div> |
| |
| |
| </div> |
| </div> |
| <div class="row"> |
| <div class="blue-divider"></div> |
| <footer> |
| <div class="container-fluid"> |
| <div class="row"> |
| <div class="col-sm-9"> |
| <h1>More Resources</h1> |
| <div class="row"> |
| <div class="col-sm-4"> |
| <h2>General</h2> |
| <ul class="nav"> |
| <li> |
| <a target="_blank" href="https://projects.apache.org/project.html?cordova">Apache Project Page</a> |
| </li> |
| <li> |
| <a href="https://www.apache.org/dyn/closer.cgi/cordova">Source Distribution</a> |
| </li> |
| <li> |
| <a target="_blank" href="https://www.apache.org/licenses">License</a> |
| </li> |
| <li> |
| <a href="/artwork">Artwork</a> |
| </li> |
| </ul> |
| </div> |
| <div class="col-sm-4"> |
| <h2>Development</h2> |
| <ul class="nav"> |
| <li><a target="_blank" href="https://github.com/apache?utf8=%E2%9C%93&q=cordova-">Source Code</a></li> |
| <li><a target="_blank" href="https://github.com/apache/cordova#filing-a-bug">Issue Tracker</a></li> |
| <li><a target="_blank" href="https://stackoverflow.com/questions/tagged/cordova">Stack Overflow</a></li> |
| <li><a href="/contact">Mailing List</a></li> |
| <li><a href="/contribute/nightly_builds.html">Nightly builds</a></li> |
| </ul> |
| </div> |
| <div class="col-sm-4"> |
| <h2>Apache Software Foundation</h2> |
| <ul class="nav"> |
| <li> |
| <a target="_blank" href="https://www.apache.org/">About ASF</a> |
| </li> |
| <li> |
| <a target="_blank" href="https://www.apache.org/events/current-event">Events</a> |
| </li> |
| <li> |
| <a target="_blank" href="https://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a> |
| </li> |
| <li> |
| <a target="_blank" href="https://www.apache.org/foundation/thanks.html">Thanks</a> |
| </li> |
| <li> |
| <a target="_blank" href="https://www.apache.org/security/">Security</a> |
| </li> |
| <li> |
| <a target="_blank" href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy policy</a> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </div> |
| <div class="col-sm-3"> |
| <h1>Contribute</h1> |
| <p style="padding-top:20px"><strong>Help Cordova move forward!</strong></p> |
| <p>Report bugs, improve the docs, or contribute to the code.</p> |
| <a href="/contribute" class="btn btn-lg btn-primary"> |
| Learn More |
| </a> |
| <p style="padding-top:20px"> <a href="https://twitter.com/apachecordova" class="twitter-follow-button" data-show-count="false">Follow @apachecordova</a></p> |
| </div> |
| </div> |
| <p class="copyright_text"> |
| Copyright © 2024 <a href="https://apache.org">The Apache Software Foundation</a>, Licensed under the <a target="_blank" href="https://www.apache.org/licenses/">Apache License, Version 2.0</a>.<br/> |
| Apache and the Apache feather logos are <a target="_blank" href="https://www.apache.org/foundation/marks/list/">trademarks</a> of The Apache Software Foundation. |
| <br/> |
| <p>See the <a href="/attributions/">attributions page</a> for other copyright & trademark notices.</p> |
| </p> |
| |
| </div> |
| </footer> |
| |
| </div> |
| </div> |
| </div> |
| |
| <script defer type="text/javascript" src="/static/js/lib/toc.min.js"></script> |
| <script defer type="text/javascript" src="/static/js/docs.js"></script> |
| |
| <script defer type="text/javascript" src="/static/js/index.js"></script> |
| <script defer type="text/javascript" src="/static/js/twitter.js"></script> |
| </body> |
| </html> |