Deprecation Policy
Apache Cordova follows a MAJOR.MINOR.PATCH version schema.
- All public API method signatures will remain available between MAJOR releases. A signature is considered public if it is documented in the Cordova docs.
- All JS signatures that are slated for deprecation will have deprecation notices added via console.log to give developers sufficient warning.
- All native signatures will have analogue shims to maintain backward compatibility. It is recommended, if possible, these shims exist in discreet files and have a companion JIRA ticket assigned to the next MAJOR release for removal.
- This page is for upcoming deprecations. This policy first came into place with Android 2.0.0.
On the mailing list, we adopted a 3 release deprecation policy by consensus: http://markmail.org/thread/46t6khgudddrzjcq#query:+page:1+mid:de4rmoh362bv7ckw+state:results
List of deprecated features
Feature |
Deprecation Notice |
Remove By |
Issue |
Android - Remove Froyo Support |
2.8.0 |
July 2013 |
|
All - change <plugin> to <feature> in config.xml |
2.8.0 |
July 2013 / 3.0.0 |
|
iOS - change CDVConnection ReachableViaWWAN return from '2g' to 'cellular' |
2.6.0 |
July 2013 / 3.0.0 |
|
iOS - config.xml EnableLocation preference removal |
2.6.0 |
July 2013 / 3.0.0 |
|
iOS - CDVURLProtocol registerPGHttpURLProtocol method removal |
2.0.0 |
Jan 2013 |
|
iOS - CDVURLProtocol registerURLProtocol method removal |
2.0.0 |
Jan 2013 |
|
iOS - CDVViewController invokeString property removal |
2.0.0 |
Jan 2013 |
|
iOS - CDVCommandDelegate registerPlugin method removal |
2.2.0 |
April 2013 |
|
iOS - BackupWebStorage Cordova.plist property change from boolean to string |
2.2.0 |
April 2013 |
|
iOS - window.Settings (CDVDevice) |
2.5.0 |
August 2013 |
|
Android - backHistory removal |
2.2.0 |
April 2013 |
|
Android - exec() returns the success payload when the call completes synchronously |
2.2.0 |
April 2013 |
|
Android - CordovaInterface.getContext() |
2.0.0 |
December 2012 |
|
Android - CordovaInterface.cancelLoadUrl() |
2.0.0 |
December 2012 |
|
Android - device.name |
2.3.0 |
May 2013 |
|
Android - OS versions 2.1 and 3.x |
2.3.0 |
May 2013 |
|
Android - org.apache.cordova.api.Plugin in favour of org.apache.cordova.api.CordovaPlugin |
2.3.0 |
May 2013 |
a few tips on what to do with deprecated code
Cordova Plugin Upgrade Guide
Cordova Plugin Upgrade Guide
https://github.com/phonegap/phonegap-plugins/blob/master/iOS/README.md
The type "Plugin" is deprecated
The type "Plugin" is deprecated. So any old code (such as the code at http://docs.phonegap.com/en/2.0.0/guide_plugin-development_android_index.md.html ) that says
import org.apache.cordova.api.Plugin;
public class TestPhonegapPlugin extends Plugin {/*...*/}will need to be updated to say
import org.apache.cordova.api.CordovaPlugin;
public class TestPhonegapPlugin extends CordovaPlugin {/*...*/}
deprecation: window.addPlugin and window.plugins will be removed
The window.addPlugin and window.plugins will be removed.
You should switch to using cordova.require(). See http://simonmacdonald.blogspot.com/2012/08/so-you-wanna-write-phonegap-200-android.html
deprecation: Removal of Legacy Context
CordovaInterface may not be a Context object, therefore all plugins that use a context object ctx should use the new Cordova methods to access the activity to use the activities' methods
ctx.getAssets()
will no longer get the assets of the activity. Instead, plugin developers needing access to the activity should call getActivity, which should be implemented by the CordovaInterface. It should be noted that if the developer is not using DroidGap for their application, they are responsible for implementing this method and making sure the main activity is returned, and that plugin developers should be prepared for the case when the activity is null. (i.e. Lock-Screen Widgets). A working example of this method is below.
cordova.getActivity().getAssets()
deprecation philosophy
All technology deprecates with time.
The ultimate purpose of PhoneGap is to cease to exist.
-- "PhoneGap Beliefs, Goals, and Philosophy" http://phonegap.com/2012/05/09/phonegap-beliefs-goals-and-philosophy/