cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject docs commit: [CB-4293] Improve documentation for ios native plugin classes, esp. w.r.t. onload parameter.
Date Tue, 30 Jul 2013 20:43:36 GMT
Updated Branches:
  refs/heads/master 83bce5d7e -> 47a8a94e8


[CB-4293] Improve documentation for ios native plugin classes, esp. w.r.t. onload parameter.


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/47a8a94e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/47a8a94e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/47a8a94e

Branch: refs/heads/master
Commit: 47a8a94e86a01483ea30a7b127ef4bb2728b67f6
Parents: 83bce5d
Author: Fil Maj <maj.fil@gmail.com>
Authored: Tue Jul 30 13:43:24 2013 -0700
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Tue Jul 30 13:43:24 2013 -0700

----------------------------------------------------------------------
 docs/en/edge/guide/platforms/ios/plugin.md | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/47a8a94e/docs/en/edge/guide/platforms/ios/plugin.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/guide/platforms/ios/plugin.md b/docs/en/edge/guide/platforms/ios/plugin.md
index 5065997..2ad548b 100644
--- a/docs/en/edge/guide/platforms/ios/plugin.md
+++ b/docs/en/edge/guide/platforms/ios/plugin.md
@@ -22,7 +22,8 @@ license: Licensed to the Apache Software Foundation (ASF) under one
 A plugin is an Objective-C class that extends the `CDVPlugin` class.
 
 Each plugin class must be registered as a `<feature>` tag in the
-`config.xml` file.
+`config.xml` file. It is through this mechanism that JavaScript's `exec`
+method's `service` parameter maps to an Objective-C class.
 
 ## Plugin Class Mapping
 
@@ -41,21 +42,22 @@ application's project's `config.xml` file.
         <param name="ios-package" value="CDVLocalStorage" />
     </feature>
 
-The feature name='name' should match what you use in the JavaScript
-`exec` call, and the value matches the name of the plugin's
-Objective-C class. param name should always be "ios-package".
-Otherwise the plugin may compile but would not be
+The feature `name` attribute should match what you use in the JavaScript
+`exec` call's `service` parameter, and the `value` attribute should match the name of the
plugin's
+Objective-C class. `<param name>` should always be i`"ios-package"`.
+If you do not follow this setup, the plugin may compile but will not be
 reachable by Cordova.
 
 ## Plugin Initialization and Lifetime
 
 One instance of a plugin object is created for the life of each
 `UIWebView`. Plugins are not instantiated until they are first
-referenced by a call from JavaScript, unless the `onload` attribute
-is set within `config.xml`. E.g.:
+referenced by a call from JavaScript, unless `<param>` with an `onload`
+`name` attribute is set to `"true"` in `config.xml`. E.g.:
 
-    <feature name="Echo" onload="true">
+    <feature name="Echo">
         <param name="ios-package" value="Echo" />
+        <param name="onload" value="true" />
     </feature>
 
 There is _no_ designated initializer for plugins. Instead, plugins


Mime
View raw message