Differences between revisions 1 and 2
Revision 1 as of 2014-01-31 00:04:15
Size: 668
Editor: jbondc
Comment:
Revision 2 as of 2014-01-31 17:45:26
Size: 2439
Editor: jbondc
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Cordova Hybrid config== == Cordova configs ==
Line 3: Line 3:
=== {$CLI_PROJECT}/cordova.xml === - {$PLATFORM_RUNTIME} is either just "android" (default runtime) or "android.chromeview" (alternative runtime)
- {$CLI_PROJECT} is the root the cordova cli

=== Hybrid: {$CLI_PROJECT}/config.xml ===
Line 6: Line 9:
 <name>Some app (beta!)</name>  <name>Some app</name>
Line 29: Line 32:
  <!-- engine specific config, why engine? api-environment/context? -->
  <engine name="cordova">
     <content src="index.html" />
     <access origin="*" />
  </engine>
  
  <!-- <api name="cordova" ..> -->
  <!-- <context name="cordova" ..> ? -->
  <!-- <env name="cordova" ..> ? -->
  <!-- <js-env name="cordova" ..> ? -->
  <!-- <hostenv name="cordova" ..> ? -->
Line 30: Line 44:

Could keep 'config.xml' and create new "cordova" namespace:
http://phonegap.com/blog/2014/01/30/customizing-your-android-manifest-and-ios-property-list-on-phonegap-build/

=== Install meta: {$CLI_PROJECT}/plugins/{$PLATFORM_RUNTIME}.json ===

- 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.

=== Runtime meta: {$CLI_PROJECT}/platforms/{$PLATFORM_RUNTIME}/www/wat.json ===

"WAT" --> "Web app technology? Existing configs:
http://dev.w3.org/2006/waf/widgets/
https://developer.mozilla.org/en-US/Apps/Developing/Manifest

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) */
   }
}
}

=== Defaults: {$CLI_PROJECT}/.cordova/defaults.xml ===

Store all global configuration & platform defaults in a single file

=== TODO ===

Where should plugman / independant project store it's configs?

Cordova configs

- {$PLATFORM_RUNTIME} is either just "android" (default runtime) or "android.chromeview" (alternative runtime) - {$CLI_PROJECT} is the root the cordova cli

Hybrid: {$CLI_PROJECT}/config.xml

<app>

  • <!-- default/global configuration of application --> <name>Some app</name> <version>1.0.1</version> <icon></icon>

    <!-- platform specific config and/or overrides --> <platform name="ios">

    • <version build="2">1.0.1</version> <icon id="foo@2x">path</icon>

    </platform>

    <platform name="android">

    • <version release="1.0.0" .../> <icon/>

      • <!-- runtime specific config and/or overrides -->

      <runtime name="chromeview">

      • <name>Some app (beta!)</name> <dosomething />

      </runtime>

    </platform>

    • <!-- engine specific config, why engine? api-environment/context? --> <engine name="cordova">

      • <content src="index.html" /> <access origin="*" />

      </engine>

      <!-- <api name="cordova" ..> --> <!-- <context name="cordova" ..> ? --> <!-- <env name="cordova" ..> ? --> <!-- <js-env name="cordova" ..> ? --> <!-- <hostenv name="cordova" ..> ? -->

</app>

Could keep 'config.xml' and create new "cordova" namespace: http://phonegap.com/blog/2014/01/30/customizing-your-android-manifest-and-ios-property-list-on-phonegap-build/

Install meta: {$CLI_PROJECT}/plugins/{$PLATFORM_RUNTIME}.json

- 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.

Runtime meta: {$CLI_PROJECT}/platforms/{$PLATFORM_RUNTIME}/www/wat.json

"WAT" --> "Web app technology? Existing configs: http://dev.w3.org/2006/waf/widgets/ https://developer.mozilla.org/en-US/Apps/Developing/Manifest

Typically this would be loaded by the WebView / browser.

{ "name": "Some app!", "version": "1.0.1", "meta": {

  • "cordova": {
    • "plugins": [], /* list of plugins installed "modules": []

    • }

} }

Defaults: {$CLI_PROJECT}/.cordova/defaults.xml

Store all global configuration & platform defaults in a single file

TODO

Where should plugman / independant project store it's configs?

config/cordova.xml (last edited 2014-06-03 16:52:53 by jbondc)