Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4E3FC10B11 for ; Thu, 4 Jul 2013 18:19:44 +0000 (UTC) Received: (qmail 72514 invoked by uid 500); 4 Jul 2013 18:19:43 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 72442 invoked by uid 500); 4 Jul 2013 18:19:42 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 71496 invoked by uid 99); 4 Jul 2013 18:19:37 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jul 2013 18:19:37 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2E62C82AE0E; Thu, 4 Jul 2013 18:19:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: mwbrooks@apache.org To: commits@cordova.apache.org Date: Thu, 04 Jul 2013 18:19:47 -0000 Message-Id: <3afe7dcf65144bddb424a0a8bcfd3cac@git.apache.org> In-Reply-To: <856f6237547b492bb2dd0525fcfcfb66@git.apache.org> References: <856f6237547b492bb2dd0525fcfcfb66@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [12/20] [CB-3827] move platform-specific files within platforms dir; rename dirs within platforms http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/610314b2/docs/en/edge/guide/plugin-development/ios/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/plugin-development/ios/index.md b/docs/en/edge/guide/plugin-development/ios/index.md deleted file mode 100644 index 61bc117..0000000 --- a/docs/en/edge/guide/plugin-development/ios/index.md +++ /dev/null @@ -1,230 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -# iOS Plugins - -A plugin is an Objective-C class that extends the `CDVPlugin` class. - -Each plugin class must be registered using the config.xml file, as a <plugin> tag under the <plugins> key. - -## Plugin Class Mapping - -The JavaScript portion of a plugin always uses the `cordova.exec` method as follows: - - exec(, , , , []); - -This marshals a request from the `UIWebView` to the iOS native side, -more or less boiling down to calling the `action` method on the -`service` class, with the arguments passed in the `args` array. - -The plugin must be added under the `` tag of your Cordova-iOS -application's project's `config.xml` file. - - - - - -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 -reachable by Cordova. - -## Plugin Initialization and Lifetime - -There is one instance of a plugin object that is created per-UIWebView, and the lifetime of the instance is tied to the UIWebView. Plugins are not instantiated until they are first referenced by a call from JS, unless the `onload` attribute set within config.xml. E.g.: - - - -There is *no* designated initializer for plugins. Instead, plugins should use the `pluginInitialize` method for their start-up logic. - -Plugins with long-running requests, background activity (e.g. playing media), listeners or internal state should implement the `onReset` method and stop or clean up those activities. This method is run when the `UIWebView` navigates to a new page or refreshes, which reloads the JavaScript. - -## Writing an iOS Cordova Plugin - -We have JavaScript fire off a plugin request to the native side. We have the iOS Objective-C plugin mapped properly via the `config.xml` file. So what does the final iOS Objective-C Plugin class look like? - -What gets dispatched to the plugin via JavaScript's `exec` function gets passed into the corresponding Plugin class's `action` method. A plugin method has this signature: - - - (void)myMethod:(CDVInvokedUrlCommand*)command - { - CDVPluginResult* pluginResult = nil; - NSString* myarg = [command.arguments objectAtIndex:0]; - - if (myarg != nil) { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - } else { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Arg was null"]; - } - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - } - -1. [CDVInvokedUrlCommand.h](https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/CDVInvokedUrlCommand.h) -2. [CDVPluginResult.h](https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/CDVPluginResult.h) -3. [CDVCommandDelegate.h](https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/CDVCommandDelegate.h) - -## iOS CDVPluginResult message types - -Using CDVPluginResult you can return a variety of result types back to your JavaScript callbacks, using class methods that look like: - - + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAs... - -You can create `String`, `Int`, `Double`, `Bool`, `Array`, -`Dictionary`, `ArrayBuffer`, and `Multipart` types. Or, don't attach -any arguments (just send a status). Or, return an Error. You can -even choose to not send any plugin result at all, in which case the -callback does not fire. - -### Notes - - * `messageAsArrayBuffer` expects `NSData*` and converts to an `ArrayBuffer` for your JavaScript callback (and `ArrayBuffers` sent to a plugin from JavaScript are converted to `NSData*`). - * `messageAsMultipart` expects an `NSArray*` containing any of the other supported types, and sends the whole array as the `arguments` to your JavaScript callback. - * Quirk: this is not just syntactic sugar (though it is sweet). This way, all of the arguments are serialized/deserialized as necessary. e.g. it is safe to return `NSData*` as multipart, but not as `Array`/`Dictionary`. - -## Plugin Signatures - -The **new signature** supported beginning in **Cordova 2.1.0** is: - - - (void)myMethod:(CDVInvokedUrlCommand*)command; - -The **old (deprecated)** signature is: - - - (void)myMethod:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; - -Basically, the options dictionary has been removed for the new signature, and the callbackId is not the 0th index item for the arguments array, but it is now in a separate property. - -## Echo Plugin iOS Plugin - -We would add the following to the `` tag of the project's `config.xml` file: - - - -Then we would add the following files (`Echo.h` and `Echo.m`) to the Plugins folder inside our Cordova-iOS -application folder: - - /********* Echo.h Cordova Plugin Header *******/ - - #import - - @interface Echo : CDVPlugin - - - (void)echo:(CDVInvokedUrlCommand*)command; - - @end - - /********* Echo.m Cordova Plugin Implementation *******/ - - #import "Echo.h" - #import - - @implementation Echo - - - (void)echo:(CDVInvokedUrlCommand*)command - { - CDVPluginResult* pluginResult = nil; - NSString* echo = [command.arguments objectAtIndex:0]; - - if (echo != nil && [echo length] > 0) { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:echo]; - } else { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR]; - } - - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - } - - @end - -Let's take a look at the code. At the top we have all of the necessary -Cordova imports. Our class extends from `CDVPlugin` - very important. - -This plugin only supports one action, the `echo` action. First, we -grab the echo string using the `objectAtIndex` method on our `args`, -telling it we want to get the 0th parameter in the arguments array. We -do a bit of parameter checking: make sure it is not `nil`, and make -sure it is not a zero-length string. - -If it is, we return a `PluginResult` with an `ERROR` status. If all of -those checks pass, then we return a `PluginResult` with an `OK` -status, and pass in the `echo` string we received in the first place -as a parameter. - -Finally, we send the result to `self.commandDelegate`, which executes -the `exec` method's success or failure callbacks on the JavaScript -side. If the success callback is called, it passes in the `echo` -parameter. - -## Threading - -Plugin methods are executed in the same thread as the UI. If your -plugin requires a great deal of processing or requires a blocking -call, you should use a background thread. For example: - - - (void)myPluginMethod:(CDVInvokedUrlCommand*)command - { - // Check command.arguments here. - [self.commandDelegate runInBackground:^{ - NSString* payload = nil; - // Some blocking logic... - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:payload]; - // The sendPluginResult method is thread-safe. - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - }]; - } - -## Advanced Plugin Functionality - -See other methods that you can override in: - -1. [CDVPlugin.h](https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/CDVPlugin.h) -2. [CDVPlugin.m](https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/CDVPlugin.m) - -For example, you can hook into the `pause`, `resume`, app terminate and `handleOpenURL` events. - -## Debugging Plugins - -To debug the Objective-C side, you would use Xcode's built-in debugger. -For JavaScript, on iOS 5.0 you can use -[Weinre, an Apache Cordova Project](https://github.com/apache/cordova-weinre) or -[iWebInspector, a third-party utility](http://www.iwebinspector.com/) - -For iOS 6, you would use Safari 6.0 to simply attach to your app -running in the iOS 6 Simulator. - -## Common Pitfalls - -* Don't forget to add your plugin's mapping to config.xml. If you forget, an error is logged in the Xcode console. -* Don't forget to add any hosts you connect to in the whitelist, as described in Domain Whitelist Guide. If you forget, an error is logged in the Xcode console. - -## Deprecated Plugin Signature Note - -The **old (deprecated)** signature is: - - - (void) myMethod:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; - -The Objective-C plugin method's `options` parameter is deprecated, and -should not be used. For legacy reasons, the last JavaScript object -passed in the `args` array is passed in as the `options` dictionary of -the Objective-C method. You must make sure that any JavaScript object -that is passed in as an element in the `args` appears as the last item -in the array. Otherwise it throws off the array index for all -subsequent parameters of the Objective-C array. Only one JavaScript -object is supported for the options dictionary, and only the last one -encountered will be passed to the native method. Errors stemming from -this problem are the reason `options` has been deprecated. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/610314b2/docs/en/edge/guide/plugin-development/windows-phone/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/plugin-development/windows-phone/index.md b/docs/en/edge/guide/plugin-development/windows-phone/index.md deleted file mode 100644 index ed89361..0000000 --- a/docs/en/edge/guide/plugin-development/windows-phone/index.md +++ /dev/null @@ -1,194 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -Windows Phone Plugins -==================================== - -Writing a plugin for Cordova on Windows Phone requires a basic understanding of -the architecture of Cordova. Cordova-WP7 consists of a WebBrowser which hosts the -application JavaScript code and manages native API calls. There is a BaseCommand -(`WP7CordovaClassLib.Cordova.Commands.BaseCommand`) class in C# which you can extend, -and it comes with the majority of the 'plumbing' built for you already. - -1. Select your project, and right-click to choose __Add → New Item...__ - - Preferably add it to the 'Plugins' folder, but it is up to you -2. Select 'Class' and name it `Echo.cs` - - The name of this class must _exactly_ match what you call into `cordova.exec(win, fail, "Echo", ...)` -3. Include the base classes implementation - - using WPCordovaClassLib.Cordova; - using WPCordovaClassLib.Cordova.Commands; - using WPCordovaClassLib.Cordova.JSON; - -4. Extend your class from BaseCommand - - public class Echo : BaseCommand - { - // ... - } - -5. Add a method that is callable from JS - - public class Echo : BaseCommand - { - public void echo(string options) - { - // all JS callable plugin methods MUST have this signature! - // public, returning void, 1 argument that is a string - } - } - -Namespaces ----------- - -The default namespace for unqualified commands is: - - namespace Cordova.Extension.Commands - { - // ... - } - -If you want to use your own namespace, you need to make a fully -qualified call to `cordova.exec`. For example, if you want to define -your C# class like this: - - namespace com.mydomain.cordovaExtensions - { - public class Echo : BaseCommand - { - // ... - } - } - -Then, in JS you need to call `exec` like this: - - cordova.exec(win, fail, "com.mydomain.cordovaExtensions.Echo", ...); - -Interpreting your arguments in C# ----------------------------------- - -The data received by your plugin method is a string value, but in actuality -looking at our JavaScript code, we see our intention was to pass an array of strings. -Looking back at our JS call to `cordova.exec`, we see we passed `[str]`: - - cordova.exec(win, fail, "Echo", "echo", ["input string"]); - -If we inspect the options string passed in to our `Echo.echo` method, -we see that the value is actually: - - "[\"input string\"]" - -All JavaScript exec arguments are JSON encoded before being passed into C#. - -If we want to treat this as the string we were expecting, we need to decode it. -We can use simple JSON deserialization. - - string optVal = JsonHelper.Deserialize(options)[0]; - // optVal now has the value of "input string" - -Passing results from C# to JS ------------------------------ - -The base class BaseCommand provides methods for passing data to your JS callback handlers. -To simply signal that the command has succeeded, when no additional result info is needed, -you can can simply call: - - DispatchCommandResult(); // calls back with an empty plugin result, considered a success callback - -To pass data back, you need to call a different version of `DispatchCommandResult`: - - DispatchCommandResult(new PluginResult(PluginResult.Status.OK, "Everything went as planned, this is a result that is passed to the success handler.")); - -To pass structured object data back to JS, it should be encoded as a JSON string: - - DispatchCommandResult(new PluginResult(PluginResult.Status.OK, "{result:\"super awesome!\"}")); - -If you need to signal that an error has occurred, you can call `DispatchCommandResult` with a `PluginResult` object: - - DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, "Echo signaled an error")); - -Handling serialization errors in your plugin's C# method --------------------------------------------------------- - -When interpreting your arguments, it is a good idea to use a try/catch block -in case we have bad input. This is a pattern used throughout the Cordova C# code: - - string optVal = null; - - try - { - optVal = JsonHelper.Deserialize(options)[0]; - } - catch(Exception) - { - // simply catch the exception, we handle null values and exceptions together - } - - if (optVal == null) - { - DispatchCommandResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION)); - } - else - { - // ... continue on to do our work - } - -Advanced Plugin Functionality ------------------------------ - -See other methods that you can override in: - -1. [BaseCommand.cs](https://github.com/apache/cordova-wp7/blob/master/templates/standalone/cordovalib/Commands/BaseCommand.cs) - -For example, you can hook into the 'pause' and 'resume' application events. - -### Debugging Plugins - -To debug the C# side, you can use Visual Studio's debugger, just set a break point -at any of the methods exposed by your class. - -JavaScript is a little more difficult to debug on Windows Phone. You -need to use `console.log` to output the state of your plugin, or -inform yourself of errors. - -Common Pitfalls ---------------- - -- Be careful when deciding on the arguments you pass to native in your JavaScript - implementation. Most device platforms expect the args passed to cordova.exec - to be an array, but if you have different types of objects in this array, it - becomes difficult or impossible to deserialize. - - cordova.exec(win, fail, "ServiceName", "MethodName", ["this is a string", 54, {literal:'trouble'}]); - - - This means that your C# code receives a difficult to decode string value, such as: - - "[\"this is a string\", 54, { literal:'trouble' }]" - - - Consider converting ALL parameters to strings before calling exec: - - cordova.exec(win, fail, "ServiceName", "MethodName", ["this is a string", "54", "{literal:'trouble'}"]) ; - - string[] optValues = JsonHelper.Deserialize(options); - -- It is usually a good idea to do parameter checking in your - JavaScript code, before you call `exec`. This allows you to re-use - more JavaScript code among your plug-in's various native - implementations. - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/610314b2/docs/en/edge/guide/plugins/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/plugins/index.md b/docs/en/edge/guide/plugins/index.md new file mode 100644 index 0000000..bebe2a8 --- /dev/null +++ b/docs/en/edge/guide/plugins/index.md @@ -0,0 +1,110 @@ +--- +license: Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--- + +# Plugin Development Guide + +A Cordova plugin bridges a bit of functionality between the WebView +powering a Cordova application and the native platform the Cordova +application is running on. Plugins are composed of a single JavaScript +interface used across all platforms, and native implementations +following platform-specific Plugin interfaces that the JavaScript +calls into. All of the core Cordova APIs are implemented using this +architecture. + +This guide steps the process of writing a simple Echo Plugin that +passes a string from JavaScript and sends it into the native +environment for the supported platforms. The native code then returns +the same string back to the callbacks inside the plugin's JavaScript. + +This guide provides enough overview on which you can build to write +more complex plugins. + +## JavaScript + +The entry point for any plugin is JavaScript. The reason developers use +Cordova is so they can use and write JavaScript, not Objective-C, +not Java, not C#. The JavaScript interface for your plugin is the +front-facing and arguably most important part of your Cordova plugin. + +You can structure your plugin's JavaScript however you like. The one +thing you _must_ use to communicate between the Cordova JavaScript + and native environments is the `cordova.exec` function. Here is an example: + + cordova.exec(function(winParam) {}, function(error) {}, "service", + "action", ["firstArgument", "secondArgument", 42, + false]); + +The parameters are detailed below: + +1. `function(winParam) {}` - Success function callback. Assuming your + `exec` call completes successfully, this function is invoked + (optionally with any parameters you pass back to it). +2. `function(error) {}` - Error function callback. If the operation does + not complete successfully, this function is invoked (optionally + with an error parameter). +3. `"service"` - The service name to call into on the native side. This + is mapped to a native class, about which more information is + available in the native guides listed below. +4. `"action"` - The action name to call into. This is picked up by the + native class receiving the `exec` call, and, depending on the + platform, essentially maps to a class's method. + The native guides listed below provide details. +5. `[/* arguments */]` - Arguments to pass into the native environment. + +### Echo Plugin JavaScript Example + + window.echo = function(str, callback) { + cordova.exec(callback, function(err) { + callback('Nothing to echo.'); + }, "Echo", "echo", [str]); + }; + +Let's dive into this. The plugin attaches itself to `window`, +specifically to the `echo` function. Plugin users would then use it as +follows: + + window.echo("echome", function(echoValue) { + alert(echoValue == "echome"); // should alert true. + }); + +First, let's take a look at the last three arguments to the `exec` +function. We will be calling the `Echo` "service", requesting the `echo` +"action", and passing an array of arguments containing the echo string, +which is the first parameter into the `window.echo` function. + +The success callback passed into `exec` is simply a reference to the +callback function that `window.echo` takes. We do a bit more for the +error callback: if the native side fires off the error callback, we +simply invoke the success callback and pass into it a "default" +string. + +## Native + +Once you define JavaScript for your plugin, you need to complement it +with at least one native implementation. Details to do so for each +platform are listed below. These guides continue to build on the +simple Echo Plugin example discussed above. + +- Android Plugins +- BlackBerry Plugins +- BlackBerry 10 Plugins +- iOS Plugins +- Windows Phone Plugins + +The Tizen platform currently does not support plugins. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/610314b2/docs/en/edge/guide/project-settings/android/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/project-settings/android/index.md b/docs/en/edge/guide/project-settings/android/index.md deleted file mode 100644 index b3c02b5..0000000 --- a/docs/en/edge/guide/project-settings/android/index.md +++ /dev/null @@ -1,43 +0,0 @@ - - -Android Configuration -=================================== - -The `config.xml` settings file controls various settings of Cordova. This is application wide, and not set per CordovaWebView Instance. - -## <preference> - -Various **other** preferences (as **<preference>** tags) default on not breaking existing apps. The available preferences are: - -1. **useBrowserHistory (boolean, defaults to true)** - set to false if you want to use the history shim that was used to work around the hashtag error present in Android 3.x prior to the history fix. (Note: This setting will be deprecated in April 2013) -2. **loadingDialog** - Display a native loading dialog when loading the app. The value's format is _Title, Message_ -3. **loadingPageDialog** - Display a native loading dialog when loading sub-pages. The value's format is _Title, Message_ -4. **errorUrl** - Set the error page for your application. Should be located in your Android project in file://android_asset/www/ -5. **backgroundColor** - Set the background color for your application. Supports a four-byte hex value, with the first byte representing alpha value, and the following three bytes with standard RGB values. (i.e. 0x00000000 = Black) -6. **loadUrlTimeoutValue** - How much time Cordova should wait before throwing a timeout error on the application. -7. **keepRunning (boolean, defaults to true)** - Determines whether Cordova will keep running in the background or not -8. **splashscreen** - The name of the file minus its extension in the res/drawable directory. If you have multiple assets, they all must share this common name in their respective directories. -9. **disallowOverscroll (boolean, defaults to false)** - set to true if you want to disable the glow when a user scrolls beyond the edge of the webview. - -## <plugin> - -Android supports using <feature> as analogues to <plugin> elements. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/610314b2/docs/en/edge/guide/project-settings/blackberry/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/project-settings/blackberry/index.md b/docs/en/edge/guide/project-settings/blackberry/index.md deleted file mode 100644 index ab266ad..0000000 --- a/docs/en/edge/guide/project-settings/blackberry/index.md +++ /dev/null @@ -1,29 +0,0 @@ - - -BlackBerry Configuration -=================================== - -BlackBerry fully supports the -[W3C Widget Specification](http://www.w3.org/TR/widgets/) -as well as proprietary RIM extensions. Please see the full -[BlackBerry WebWorks documentation regarding config.xml](https://developer.blackberry.com/html5/documentation/working_with_config_xml_file_1866970_11.html) -for details. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/610314b2/docs/en/edge/guide/project-settings/firefoxos/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/project-settings/firefoxos/index.md b/docs/en/edge/guide/project-settings/firefoxos/index.md deleted file mode 100644 index 2806083..0000000 --- a/docs/en/edge/guide/project-settings/firefoxos/index.md +++ /dev/null @@ -1,24 +0,0 @@ - - -FirefoxOS Configuration -=================================== - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/610314b2/docs/en/edge/guide/project-settings/ios/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/project-settings/ios/index.md b/docs/en/edge/guide/project-settings/ios/index.md deleted file mode 100644 index ccb0ec4..0000000 --- a/docs/en/edge/guide/project-settings/ios/index.md +++ /dev/null @@ -1,60 +0,0 @@ - - -iOS Configuration -======================== - -The `config.xml` settings file controls various settings of Cordova. This is application wide, and not set per CDVViewController instance. -The `config.xml` file is located in your `/` directory. - -## <preference> - -Various preferences (as **<preference>** tags) default on not breaking existing apps. The available preferences are: - -1. **DisallowOverscroll (boolean, defaults to false)** - set to true if you don't want the WebView to rubber-band - -2. **TopActivityIndicator (string, defaults to 'gray')** - this is the top spinning throbber in the status/battery bar, valid values are `whiteLarge`, `white`, and `gray` - -3. **EnableLocation (boolean, defaults to false)** - set to true, to initialize the Geolocation plugin at start-up (so the fix on your location can be more accurate) **DEPRECATED**: please set the **onload** attribute of the **Geolocation** plugin to **true** instead. - -4. **EnableViewportScale (boolean, defaults to false)** - set to true to prevent viewport scaling through a meta tag - -5. **AutoHideSplashScreen (boolean, defaults to true)** - set to false to control when the splashscreen is hidden through a JavaScript API - -6. **FadeSplashScreen (boolean, defaults to true)** - set to false to prevent the splash-screen to fade in and out when showing/hiding it. - -7. **FadeSplashScreenDuration (float, defaults to 2)** - The splash-screen Fade duration in seconds. - -8. **ShowSplashScreenSpinner (boolean, defaults to true)** - set to false to hide the splash-screen spinner - -9. **MediaPlaybackRequiresUserAction (boolean, defaults to false)** - set to true to not allow autoplayed HTML5 video - -10. **AllowInlineMediaPlayback (boolean, defaults to false)** - set to true to allow inline HTML5 media playback, also, the video element in the HTML document must also include the webkit-playsinline attribute - -11. **BackupWebStorage (string, defaults to 'cloud')** - valid values are 'none', 'cloud' and 'local'. Set to 'cloud' to allow the web storage data to be backed up to iCloud, and set to 'local' to only allow local backups (iTunes sync). Set to 'none' to not allow any backups of web storage. - -12. **KeyboardDisplayRequiresUserAction (boolean, defaults to true)** - set to false to open the keyboard when form elements get focus via the JavaScript focus() call. - -13. **SuppressesIncrementalRendering (boolean, defaults to false)** - set to true to wait until all new view content has been received before it is rendered. - -14. **HideKeyboardFormAccessoryBar (boolean, defaults to false)** - set to true to hide the additional toolbar that is on top of the keyboard (this is the toolbar that has the Prev, Next and Done buttons) - -15. **KeyboardShrinksView (boolean, defaults to false)** - set to true to shrink the WebView when the keyboard comes up. The WebView shrinks instead of the viewport shrinking and the page scrollable. This applies to apps that position their elements relative to the bottom of the WebView. This is the default behaviour on Android, and makes a lot of sense when building apps as opposed to webpages. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/610314b2/docs/en/edge/guide/project-settings/windows8/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/project-settings/windows8/index.md b/docs/en/edge/guide/project-settings/windows8/index.md deleted file mode 100644 index dfeb618..0000000 --- a/docs/en/edge/guide/project-settings/windows8/index.md +++ /dev/null @@ -1,26 +0,0 @@ - - -Windows 8 Configuration -=================================== - -Windows 8 does not currently support this feature. - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/610314b2/docs/en/edge/guide/project-settings/wp7/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/project-settings/wp7/index.md b/docs/en/edge/guide/project-settings/wp7/index.md deleted file mode 100644 index 23c8304..0000000 --- a/docs/en/edge/guide/project-settings/wp7/index.md +++ /dev/null @@ -1,25 +0,0 @@ - - -Windows Phone 7 Configuration -=================================== - -Windows Phone 7 does not currently have any additional configurable features. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/610314b2/docs/en/edge/guide/project-settings/wp8/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/project-settings/wp8/index.md b/docs/en/edge/guide/project-settings/wp8/index.md deleted file mode 100644 index de0e54b..0000000 --- a/docs/en/edge/guide/project-settings/wp8/index.md +++ /dev/null @@ -1,25 +0,0 @@ - - -Windows Phone 8 Configuration -=================================== - -Windows Phone 8 does not currently have any additional configurable features. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/610314b2/docs/en/edge/guide/upgrading/android/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/upgrading/android/index.md b/docs/en/edge/guide/upgrading/android/index.md deleted file mode 100644 index 63019d3..0000000 --- a/docs/en/edge/guide/upgrading/android/index.md +++ /dev/null @@ -1,242 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -Upgrading Android -========================= - -This document is for people who need to upgrade their Cordova versions from an older version to a current version of Cordova. - -## Upgrade to 2.9.0 from 2.8.0 -1. Run bin/update - -## Upgrade to 2.8.0 from 2.7.0 ## -1. Remove cordova-2.7.0.jar from the libs directory in your project -2. Add cordova-2.8.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova.js into your project -5. Update your HTML to use the new cordova.js file -6. Copy the res/xml/config.xml to be the same as the one found in framework/res/xml/config.xml -7. Update framework/res/xml/config.xml to have similar settings as it did previously -8. Copy files from bin/templates/cordova to the cordova directory in your project - -## Upgrade to 2.7.0 from 2.6.0 ## -1. Remove cordova-2.6.0.jar from the libs directory in your project -2. Add cordova-2.7.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-2.7.0.js into your project -5. Update your HTML to use the new cordova-2.7.0.js file -6. Copy the res/xml/config.xml to be the same as the one found in framework/res/xml/config.xml -7. Update framework/res/xml/config.xml to have similar settings as it did previously -8. Copy files from bin/templates/cordova to the cordova directory in your project - - -## Upgrade to 2.6.0 from 2.5.0 ## -1. Remove cordova-2.5.0.jar from the libs directory in your project -2. Add cordova-2.6.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-2.6.0.js into your project -5. Update your HTML to use the new cordova-2.6.0.js file -6. Copy the res/xml/config.xml to be the same as the one found in framework/res/xml/config.xml -7. Update framework/res/xml/config.xml to have similar settings as it did previously -8. Copy files from bin/templates/cordova to the cordova directory in your project - -. Run bin/update with the project path listed in the Cordova Source directory - -## Upgrade to 2.5.0 from 2.4.0 ## - -1. Remove cordova-2.4.0.jar from the libs directory in your project -2. Add cordova-2.5.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-2.5.0.js into your project -5. Update your HTML to use the new cordova-2.5.0.js file -6. Copy the res/xml/config.xml to be the same as the one found in framework/res/xml/config.xml -7. Update framework/res/xml/config.xml to have similar settings as it did previously -8. Copy files from bin/templates/cordova to the cordova directory in your project - -## Upgrade to 2.4.0 from 2.3.0 ## - -1. Remove cordova-2.3.0.jar from the libs directory in your project -2. Add cordova-2.4.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-2.4.0.js into your project -5. Update your HTML to use the new cordova-2.4.0.js file -6. Copy the res/xml/config.xml to be the same as the one found in framework/res/xml/config.xml -7. Copy files from bin/templates/cordova to the cordova directory in your project - -## Upgrade to 2.3.0 from 2.2.0 ## - -1. Remove cordova-2.2.0.jar from the libs directory in your project -2. Add cordova-2.3.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-2.3.0.js into your project -5. Update your HTML to use the new cordova-2.3.0.js file -6. Copy the res/xml/config.xml to be the same as the one found in framework/res/xml/config.xml -7. Copy files from bin/templates/cordova to the cordova directory in your project - -## Upgrade to 2.2.0 from 2.1.0 ## - -1. Remove cordova-2.1.0.jar from the libs directory in your project -2. Add cordova-2.2.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-2.2.0.js into your project -5. Update your HTML to use the new cordova-2.2.0.js file -6. Copy the res/xml/config.xml to be the same as the one found in framework/res/xml/config.xml -7. Copy files from bin/templates/cordova to the cordova directory in your project - -## Upgrade to 2.1.0 from 2.0.0 ## - -1. Remove cordova-2.0.0.jar from the libs directory in your project -2. Add cordova-2.1.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-2.1.0.js into your project -5. Update your HTML to use the new cordova-2.1.0.js file -6. Copy the res/xml/config.xml to be the same as the one found in framework/res/xml/config.xml -7. Copy files from bin/templates/cordova to the cordova directory in your project - -## Upgrade to 2.0.0 from 1.9.0 ## - -1. Remove cordova-1.9.0.jar from the libs directory in your project -2. Add cordova-2.0.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-2.0.0.js into your project -5. Update your HTML to use the new cordova-2.0.0.js file -6. Copy the res/xml/config.xml to be the same as the one found in framework/res/xml/config.xml - -### Notes about 2.0.0 release -config.xml will be replacing cordova.xml and plugins.xml. This new file is a combination of the previous two. However, the -old files are deprecated, and and while currently still work, will cease working in a future release. - -## Upgrade to 1.9.0 from 1.8.1 ## - -1. Remove cordova-1.8.0.jar from the libs directory in your project -2. Add cordova-1.9.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-1.9.0.js into your project -5. Update your HTML to use the new cordova-1.9.0.js file -6. Update the res/xml/plugins.xml to be the same as the one found in framework/res/xml/plugins.xml - -### Notes about 1.9.0 release - -- Third-Party plugins may or may not work. This is because of the introduction of the CordovaWebView. These plugins need to get a context from the CordovaInterface using -getContext() or getActivity(). If you are not an experienced Android developer, please contact the plugin maintainer and add this task to their bug tracker. - -## Upgrade to 1.8.0 from 1.8.0 ## - -1. Remove cordova-1.8.0.jar from the libs directory in your project -2. Add cordova-1.8.1.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-1.8.1.js into your project -5. Update your HTML to use the new cordova-1.8.1.js file -6. Update the res/xml/plugins.xml to be the same as the one found in framework/res/xml/plugins.xml - -## Upgrade to 1.8.0 from 1.7.0 ## - -1. Remove cordova-1.7.0.jar from the libs directory in your project -2. Add cordova-1.8.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-1.8.0.js into your project -5. Update your HTML to use the new cordova-1.8.0.js file -6. Update the res/xml/plugins.xml to be the same as the one found in framework/res/xml/plugins.xml - -## Upgrade to 1.8.0 from 1.7.0 ## - -1. Remove cordova-1.7.0.jar from the libs directory in your project -2. Add cordova-1.8.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-1.8.0.js into your project -5. Update your HTML to use the new cordova-1.8.0.js file -6. Update the res/xml/plugins.xml to be the same as the one found in framework/res/xml/plugins.xml - -## Upgrade to 1.7.0 from 1.6.1 ## - -1. Remove cordova-1.6.1.jar from the libs directory in your project -2. Add cordova-1.7.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-1.7.0.js into your project -5. Update the res/xml/plugins.xml to be the same as the one found in framework/res/xml/plugins.xml - -## Upgrade to 1.6.1 from 1.6.0 ## - -1. Remove cordova-1.6.0.jar from the libs directory in your project -2. Add cordova-1.6.1.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-1.6.1.js into your project -5. Update the res/xml/plugins.xml to be the same as the one found in framework/res/xml/plugins.xml - -## Upgrade to 1.6.0 from 1.5.0 ## -1. Remove cordova-1.5.0.jar from the libs directory in your project -2. Add cordova-1.6.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-1.6.0.js into your project -5. Update your HTML to use the new cordova-1.6.0.js file -6. Update the res/xml/plugins.xml so that it is the same as the one found in framework/res/xml/plugins.xml -7. Replace the res/xml/phonegap.xml with res/xml/cordova.xml so that it is the same as the one found in framework/res/xml/cordova.xml - -## Upgrade to 1.5.0 from 1.4.0## -1. Remove phonegap-1.4.0.jar from the libs directory in your project -2. Add cordova-1.5.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new cordova-1.5.0.js into your project -5. Update your HTML to use the new cordova-1.5.0.js file -6. Update the res/xml/plugins.xml so that it is the same as the one found in framework/res/xml/plugins.xml -7. Replace the res/xml/phonegap.xml with res/xml/cordova.xml so that it is the same as the one found in framework/res/xml/cordova.xml - -## Upgrade to 1.4.0 from 1.3.0 ## -1. Remove phonegap-1.3.0.jar from the libs directory in your project -2. Add phonegap-1.4.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new phonegap-1.4.0.js into your project -5. Update your HTML to use the new phonegap-1.4.0.js file -6. Update the res/xml/plugins.xml so that it is the same as the one found in framework/res/xml/plugins.xml -7. Update the res/xml/phonegap.xml so that it is the same as the one found in framework/res/xml/phonegap.xml - -## Upgrade to 1.3.0 from 1.2.0 ## -1. Remove phonegap-1.2.0.jar from the libs directory in your project -2. Add phonegap-1.3.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new phonegap-1.3.0.js into your project -5. Update your HTML to use the new phonegap-1.2.0.js file -6. Update the res/xml/plugins.xml so that it is the same as the one found in framework/res/xml/plugins.xml -7. Update the res/xml/phonegap.xml so that it is the same as the one found in framework/res/xml/phonegap.xml - -## Upgrade to 1.2.0 from 1.1.0 ## -1. Remove phonegap-1.1.0.jar from the libs directory in your project -2. Add phonegap-1.2.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new phonegap-1.2.0.js into your project -5. Update your HTML to use the new phonegap-1.2.0.js file -6. Update the res/xml/plugins.xml so that it is the same as the one found in framework/res/xml/plugins.xml -7. Update the res/xml/phonegap.xml so that it is the same as the one found in framework/res/xml/phonegap.xml - -## Upgrade to 1.1.0 from 1.0.0 ## -1. Remove phonegap-1.0.0.jar from the libs directory in your project -2. Add phonegap-1.1.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new phonegap-1.1.0.js into your project -5. Update your HTML to use the new phonegap-1.1.0.js file -6. Update the res/xml/plugins.xml so that it is the same as the one found in framework/res/xml/plugins.xml - -## Upgrade to 1.0.0 from 0.9.6 ## -1. Remove phonegap-0.9.6.jar from the libs directory in your project -2. Add phonegap-1.0.0.jar to the libs directory in your project -3. If you are using Eclipse, please refresh your eclipse project and do a clean -4. Copy the new phonegap-1.0.0.js into your project -5. Update your HTML to use the new phonegap-1.0.0.js file -6. Add the res/xml/plugins.xml so that it is the same as the one found in framework/res/xml/plugins.xml - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/610314b2/docs/en/edge/guide/upgrading/blackberry/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/upgrading/blackberry/index.md b/docs/en/edge/guide/upgrading/blackberry/index.md deleted file mode 100644 index a50cddb..0000000 --- a/docs/en/edge/guide/upgrading/blackberry/index.md +++ /dev/null @@ -1,311 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -Upgrading BlackBerry -============================ - -This document describes the process of upgrading Cordova projects to the latest released version - -## Upgrading 2.8.0 projects to 2.9.0 ## - -### BlackBerry10 ### - -1. **Download and extract the Cordova 2.9.0 source** to a **permanent folder location** on your hard drive (say to ~/Cordova-2.9.0) -2. **Quit any running IDE's** Eclipse, Momentics and the lik -3. **Navigate** to the directory where you put the downloaded source above, using a unix like terminal: **Terminal.app**, **Bash**, **Cygwin**, etc. -4. **Create a new project**, as described in Blackberry Command-line Tools. This becomes the home of your updated project. -5. **Copy** your projects source from the old project's /www folder to the new project's /www folder -6. **Update** the Cordova script reference in your **www/index.html** file (and any other files that contain the script reference) to point to the new **cordova.js** file - -### BlackBerryOS/Playbook ### - -1. **Download and extract the Cordova 2.9.0 source** to a **permanent folder location** on your hard drive (say to ~/Cordova-2.9.0) -2. **Quit any running IDE's** Eclipse, Momentics and the like. -3. **Navigate** to the directory where you put the downloaded source above, using a unix like terminal: **Terminal.app**, **Bash**, **Cygwin**, etc. -4. **Create a new project**, as described in iOS Command-line Tools. You need the assets from this new project. -5. **Copy** the **www/cordova.js** file from the new project into your **www** folder, and delete your **www/cordova.js** file -6. **Update** the Cordova script reference in your **www/index.html** file (and any other files that contain the script reference) to point to the new **cordova.js** file -7. **Copy** the **native** folder from the new project into the existing project, overwriting the old **native** folder -8. **Copy** the **lib** folder from the new project into the existing project, overwriting the old **lib** folder -9. **Copy** the **cordova** folder from the new project into the existing project, overwriting the old **cordova** folder - -## Upgrading 2.7.0 projects to 2.8.0 ## - -### BlackBerry10 ### - -BlackBerry10 uses the new CLI tooling and manages core APIs as plugins. The instructions migrate your project to a new project, rather than updating an existing project, due to the complexity of updating an old project. -Also note that the cordova js script file is now called 'cordova.js' and no longer contains a version string. - -1. **Download and extract the Cordova 2.8.0 source** to a **permanent folder location** on your hard drive (say to ~/Cordova-2.8.0) -2. **Quit any running IDE's** Eclipse, Momentics and the like. -3. **Navigate** to the directory where you put the downloaded source above, using a unix like terminal: **Terminal.app**, **Bash**, **Cygwin**, etc. -4. **Create a new project**, as described in Blackberry Command-line Tools. This becomes the home of your updated project. -5. **Copy** your projects source from the old project's /www folder to the new project's /www folder -6. **Update** the Cordova script reference in your **www/index.html** file (and any other files that contain the script reference) to point to the new **cordova.js** file - -### BlackBerryOS/Playbook ### - -1. **Download and extract the Cordova 2.8.0 source** to a **permanent folder location** on your hard drive (say to ~/Cordova-2.8.0) -2. **Quit any running IDE's** Eclipse, Momentics and the like. -3. **Navigate** to the directory where you put the downloaded source above, using a unix like terminal: **Terminal.app**, **Bash**, **Cygwin**, etc. -4. **Create a new project**, as described in iOS Command-line Tools. You need the assets from this new project. -5. **Copy** the **www/cordova.js** file from the new project into your **www** folder, and delete your **www/cordova.js** file -6. **Update** the Cordova script reference in your **www/index.html** file (and any other files that contain the script reference) to point to the new **cordova.js** file -7. **Copy** the **native** folder from the new project into the existing project, overwriting the old **native** folder -8. **Copy** the **lib** folder from the new project into the existing project, overwriting the old **lib** folder -9. **Copy** the **cordova** folder from the new project into the existing project, overwriting the old **cordova** folder - -## Upgrading 2.6.0 projects to 2.7.0 ## - -1. **Download and extract the Cordova 2.7.0 source** to a **permanent folder location** on your hard drive (say to ~/Cordova-2.7.0) -2. **Quit any running IDE's** Eclipse, Momentics and the like. -3. **Navigate** to the directory where you put the downloaded source above, using a unix like terminal: **Terminal.app**, **Bash**, **Cygwin**, etc. -4. **Create a new project**, as described in Blackberry Command-line Tools. You need the assets from this new project. -5. **Copy** the **www/cordova-2.7.0.js** file from the new project into your **www** folder, and delete your **www/cordova-2.6.0.js** file -6. **Update** the Cordova script reference in your **www/index.html** file (and any other files that contain the script reference) to point to the new **cordova-2.7.0.js** file -7. **Copy** the **native** folder from the new project into the existing project, overwriting the old **native** folder -8. **Copy** the **lib** folder from the new project into the existing project, overwriting the old **lib** folder -9. **Copy** the **cordova** folder from the new project into the existing project, overwriting the old **cordova** folder - -## Upgrade to 2.6.0 from 2.5.0 ## - -Updating the PhoneGap download folder: - -It is recommended that you download a fresh copy of the entire folder. - -However, here are the new parts needed for the piecemeal update: -1. Update the cordova.blackberry.js file in the ‘Phonegap-2.6.0/lib/blackberry/javascript’ folder -2. Update the ‘ext’, ‘ext-air’, and ‘ext-qnx’ in the ‘Phonegap-2.6.0/lib/blackberry/framework’ folder -3. Update the ‘build.xml’ file in the ‘Phonegap-2.6.0/lib/blackberry’ folder -4. Update the the ‘Phonegap-2.6.0/lib/blackberry/bin’ folder -5. Update the ‘VERSION’ file in the ‘Phonegap-2.6.0/lib/blackberry’ folder - -Updating the example/ folder or migrating an existing project: - -1. Open your `www/` folder, which contains your app. -2. Remove and update the .jar file in the `ext/` folder. -3. Update the contents of the `ext-air/` folder. -4. Update the contents of the `ext-qnx/` folder. -4. Copy the new `cordova-2.6.0.js` into your project. -5. Update your HTML to use the new `cordova-2.6.0.js` file. - -## Upgrade to 2.5.0 from 2.4.0 ## - -Updating the PhoneGap download folder: - -It is recommended that you download a fresh copy of the entire folder. - -However, here are the new parts needed for the piecemeal update: -1. Update the cordova.blackberry.js file in the ‘Phonegap-2.5.0/lib/blackberry/javascript’ folder -2. Update the ‘ext’, ‘ext-air’, and ‘ext-qnx’ in the ‘Phonegap-2.5.0/lib/blackberry/framework’ folder -3. Update the ‘build.xml’ file in the ‘Phonegap-2.5.0/lib/blackberry’ folder -4. Update the the ‘Phonegap-2.5.0/lib/blackberry/bin’ folder -5. Update the ‘VERSION’ file in the ‘Phonegap-2.5.0/lib/blackberry’ folder - -Updating the example/ folder or migrating an existing project: - -1. Open your `www/` folder, which contains your app. -2. Remove and update the .jar file in the `ext/` folder. -3. Update the contents of the `ext-air/` folder. -4. Update the contents of the `ext-qnx/` folder. -4. Copy the new `cordova-2.5.0.js` into your project. -5. Update your HTML to use the new `cordova-2.5.0.js` file. - -## Upgrade to 2.4.0 from 2.3.0 ## - -Updating just the www folder: - -1. Open your `www/` folder, which contains your app. -2. Remove and update the .jar file in the `ext/` folder. -3. Update the contents of the `ext-air/` folder. -4. Copy the new `cordova-2.4.0.js` into your project. - - If playbook, then update the .js file in the `playbook/` folder. - - If BlackBerry10, then update the .js file in the `qnx/` folder. -5. Update your HTML to use the new `cordova-2.4.0.js` file. - - -Updating the sample folder (ie, updating using the ant tools): - -1. Open the `sample/lib/` folder. -2. Update the .jar file in the `cordova.2.3.0/ext/` folder. -3. Update the contents of the `cordova.2.3.0/ext-air/` folder. -4. Update the contents of the `cordova.2.3.0/ext-qnx/` folder. -5. Update the .js file in the `cordova.2.3.0/javascript/` folder. -6. Open the `sample/lib/` folder and rename the `cordova.2.3.0/` folder to `cordova.2.4.0/`. -7. Type `ant blackberry build` or `ant playbook build` to update the `www/` folder with updated Cordova. -8. Open the `www/` folder and update your HTML to use the new `cordova-2.4.0.js` file - -## Upgrade to 2.3.0 from 2.2.0 ## - -Updating just the `www` folder: - -1. Open your `www/` folder, which contains your app. -2. Remove and update the .jar file in the `ext/` folder. -3. Update the contents of the `ext-air/` folder. -4. Copy the new `cordova-2.3.0.js` into your project. - - If playbook, then update the .js file in the `playbook/` folder. - - If BlackBerry10, then update the .js file in the `qnx/` folder. -5. Update your HTML to use the new `cordova-2.3.0.js` file. - - -Updating the sample folder (ie, updating using the ant tools): - -1. Open the `sample/lib/` folder. -2. Update the .jar file in the `cordova.2.2.0/ext/` folder. -3. Update the contents of the `cordova.2.2.0/ext-air/` folder. -4. Update the contents of the `cordova.2.2.0/ext-qnx/` folder. -5. Update the .js file in the `cordova.2.2.0/javascript/` folder. -6. Open the `sample/lib/` folder and rename the `cordova.2.2.0/` folder to `cordova.2.3.0/`. -7. Type `ant blackberry build` or `ant playbook build` to update the `www/` folder with updated Cordova. -8. Open the `www/` folder and update your HTML to use the new `cordova-2.3.0.js` file - -## Upgrade to 2.2.0 from 2.1.0 ## - -Updating just the www folder: - -1. Open your `www/` folder, which contains your app. -2. Remove and update the .jar file in the `ext/` folder. -3. Update the contents of the `ext-air/` folder. -4. Copy the new `cordova-2.2.0.js` into your project. - - If playbook, then update the .js file in the `playbook/` folder. - - If BlackBerry10, then update the .js file in the `qnx/` folder. -5. Update your HTML to use the new `cordova-2.2.0.js` file. - - -Updating the sample folder (ie, updating using the ant tools): - -1. Open the `sample/lib/` folder. -2. Update the .jar file in the `cordova.2.1.0/ext/` folder. -3. Update the contents of the `cordova.2.1.0/ext-air/` folder. -4. Update the contents of the `cordova.2.1.0/ext-qnx/` folder. -5. Update the .js file in the `cordova.2.1.0/javascript/` folder. -6. Open the `sample/lib/` folder and rename the `cordova.2.1.0/` folder to `cordova.2.2.0/`. -7. Type `ant blackberry build` or `ant playbook build` to update the `www/` folder with updated Cordova. -8. Open the `www/` folder and update your HTML to use the new `cordova-2.2.0.js` file. - -## Upgrade to 2.1.0 from 2.0.0 ## - -Updating just the www folder: - -1. Open your `www/` folder, which contains your app. -2. Remove and update the .jar file in the `ext/` folder. -3. Update the contents of the `ext-air/` folder. -4. Copy the new `cordova-2.1.0.js` into your project. - - If playbook, then update the .js file in the `playbook/` folder. -5. Update your HTML to use the new `cordova-2.1.0.js` file. - - -Updating the sample folder (ie, updating using the ant tools): - -1. Open the `sample/lib/` folder. -2. Update the .jar file in the `cordova.2.0.0/ext/` folder. -3. Update the contents of the `cordova.2.0.0/ext-air/` folder. -4. Update the .js file in the `cordova.2.0.0/javascript/` folder. -5. Open the `sample/lib/` folder and rename the `cordova.2.0.0/` folder to `cordova.2.1.0/`. -6. Type `ant blackberry build` or `ant playbook build` to update the `www/` folder with updated Cordova. -7. Open the `www/` folder and update your HTML to use the new `cordova-2.1.0.js` file. - -## Upgrade to 2.0.0 from 1.9.0 ## - -Updating just the `www` folder: - -1. Open your `www/` folder, which contains your app. -2. Remove and update the .jar file in the `ext/` folder. -3. Update the contents of the `ext-air/` folder. -4. Copy the new `cordova-2.0.0.js` into your project. - - If playbook, then update the .js file in the `playbook/` folder. -5. Update your HTML to use the new `cordova-2.0.0.js` file. -6. Update your `www/plugins.xml` file. Two plugins changed their - namespace/service label. Change the old entries for the Capture and - Contact plugins from: - - - - - To: - - - - -Updating the sample folder (ie, updating using the ant tools): - -1. Open the `sample/lib/` folder. -2. Update the .jar file in the `cordova.1.9.0/ext/` folder. -3. Update the contents of the `cordova.1.9.0/ext-air/` folder. -4. Update the .js file in the `cordova.1.9.0/javascript/` folder. -5. Open the `sample/lib/` folder and rename the `cordova.1.9.0/` folder to `cordova.2.0.0/`. -6. Type `ant blackberry build` or `ant playbook build` to update the `www/` folder with updated Cordova. -7. Open the `www/` folder and update your HTML to use the new `cordova-2.0.0.js` file. -8. Open the `www/` folder and update the `plugins.xml` file. Two plugins - changed their namespace/service label. Change the old entries for the - Capture and Contact plugins from: - - - - - To: - - - - -- To upgrade to 1.8.0, please go from 1.7.0 - -## Upgrade to 1.8.0 from 1.7.0 ## - -Updating just the `www` folder: - -1. Open your `www/` folder, which contains your app. -2. Remove and update the .jar file in the `ext/` folder. -3. Update the contents of the `ext-air/` folder. -4. Copy the new `cordova-1.8.0.js` into your project. - - If playbook, then update the .js file in the `playbook/` folder. -5. Update your HTML to use the new `cordova-1.8.0.js` file. -6. Update your `www/plugins.xml` file. Two plugins changed their - namespace/service label. Change the old entries for the Capture and - Contact plugins from: - - - - - To: - - - - -Updating the sample folder (ie, updating using the ant tools): - -1. Open the `sample/lib/` folder. -2. Update the .jar file in the `cordova.1.7.0/ext/` folder. -3. Update the contents of the `cordova.1.7.0/ext-air/` folder. -4. Update the .js file in the `cordova.1.7.0/javascript/` folder. -5. Open the `sample/lib/` folder and rename the `cordova.1.7.0/` folder to `cordova.1.8.0/`. -6. Type `ant blackberry build` or `ant playbook build` to update the `www/` folder with updated Cordova. -7. Open the `www/` folder and update your HTML to use the new `cordova-1.8.0.js` file. -8. Open the `www/` folder and update the `plugins.xml` file. Two plugins - changed their namespace/service label. Change the old entries for the - Capture and Contact plugins from: - - - - - To: - - - -