Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cordova Wiki" for change notification.
The "config/cordova.xml" page has been changed by jbondc: https://wiki.apache.org/cordova/config/cordova.xml?action=diff&rev1=13&rev2=14 - == Cordova configs == + ... - * {$PLATFORM_RUNTIME} is either just "android" (default runtime) or "android.chromeview" (alternative runtime) - * {$CLI_PROJECT} is the root the cordova cli - * {$WWW_DIR} is the path to a platform's web app directory - - === Hybrid: {$CLI_PROJECT}/config.xml === - - {{{#!xml - <app> - <!-- default/global configuration of application --> - <name>Some app</name> - <version>1.0.1</version> - <icons> - <img src="path/app.png" width="58" height="58" /> - <img src="path/app.png" width="96" height="96" /> - </icons> - <splash> - <img src="path/splash.png" width="1024" height="768" /> - </splash> - - <!-- platform specific config and/or overrides --> - <platform name="ios"> - <version build="2">1.0.1</version> - <icons> - <img src="path/app.png" width="120" height="120" /> - </icons> - </platform> - - <platform name="android"> - <version release="1.0.0" .../> - <icon/> - - <!-- runtime specific config and/or overrides --> - <runtime name="chromeview"> - <name>Some app (beta!)</name> - <custom /> - </runtime> - - </platform> - - <!-- Particular cordova/engine config --> - <view name="cordova"> - <content src="index.html" /> - <access origin="*" /> - </view> - - </app> - }}} - - Could keep 'config.xml' and create "cdv" namespace: - - http://phonegap.com/blog/2014/01/30/customizing-your-android-manifest-and-ios-property-list-on-phonegap-build/ - - XML namespacing is great in theory, never adopted well by web developers. - - === Install meta: {$CLI_PROJECT}/platforms/{$PLATFORM_RUNTIME}/cordova/project.json === - - * All required metadata for a native cordova project: current version in the project, ...? - - * All required metadata about installed plugins for a specific platform. - (needs to convert all necessary plugin.xml information into a json format) - - * Need enough info to uninstall & re-install a plugin properly (list of files installed + version number). - - === Runtime meta: {$CLI_PROJECT}/platforms/{$PLATFORM_RUNTIME}/{$WWW_DIR}/wat.json === - - "WAT" --> "Web app technology? Existing configs: - * http://dev.w3.org/2006/waf/widgets/ - * https://developer.mozilla.org/en-US/Apps/Developing/Manifest - * http://www.w3.org/TR/2013/WD-appmanifest-20131217/ - - Typically this would be loaded by the WebView / browser. - - {{{ - { - "name": "Some app!", - "version": "1.0.1", - "meta": { /* meta-data (auto-generated by cli/plugman) - - "cordova": { - "plugins": [], /* list of plugins installed */ - "modules": [], /* list of modules to load dynamically (if needed) */ - "config" : {} /* configuration from config.xml or config.json */ - } - } - } - }}} - - === Defaults: {$CLI_PROJECT}/platforms/{$PLATFORM_RUNTIME}/cordova/project/defaults/ === - - Store all default configuration & platform files here - e.g. - * {$CLI_PROJECT}/platforms/{$PLATFORM_RUNTIME}/cordova/project/defaults/config.xml - * {$CLI_PROJECT}/platforms/{$PLATFORM_RUNTIME}/cordova/project/defaults/cordova.js - * ? - - === Plugman config: {$PLUGMAN_PROJECT}/cordova/config.xml === - - If using cli, it must update {$PLUGMAN_PROJECT}/cordova/config.xml - - === NOTES === - - Some objectives: - * cli should write plugin information to the same place as 'plugman' (cordova project) - offers an aggregate view over all installed platform projects. - - * must be able to safely rollback changes to a previous change. - project.transaction(); - project.rollback(); - project.commit(); - - * must be able to add a different plugin version to a specific native platform - - {{{ - e.g. plugin list - - org.apache.cordova.file 0.2.5 - org.apache.cordova.camera 0.2.6 (ios, windows8) - org.apache.cordova.camera 0.2.5 (android) - }}} - - * need a migration path to convert existing 3.x project - And think about easy upgrade process: - {{{ - cordova info - cordova upgrade [platform list] - }}} - - === XML vs. JSON as config === - - * User perspective - Which format is better for user? - Web devs likely prefer JSON. Native devs likely prefer XML. - - * Cordova perspective - A JSON config means the code in cordova-cli & cordova-plugman is easier to read. - No parsing involved so much faster. - Could convert XML to 1-1 mapping in JSON to get benefit of having no XML logic in the code. - - === Drop config.xml widget spec === - - * Andrew - * Braden - * Jonathan - - === Preference for JSON only as user config === - * Braden - * Josh - - === Preference for XML only as user config === - * Brian - * Jonathan - - === Preference for XML & JSON both supported as user config === - * Jonathan - - === Icons === - - An alternative to 'grouping' <icons> would be to reference images: - {{{ - <icons> - <img src="path/app.png" width="58" height="58" /> - <img src="path/app.png" width="96" height="96" /> - </icons> - <splash> - <img src="path/splash.png" width="1024" height="768" /> - </splash> - }}} - - Becomes: - {{{ - <img src="path/app.png" ref="icons" width="58" height="58" /> - <img src="path/app.png" ref="icons" width="96" height="96" /> - - <img src="path/splash.png" ref="splash" width="1024" height="768" /> - - - <img src="path/splash.png" ref="3d-something" width="1024" height="768" /> - - ... - }}} -
