Differences between revisions 30 and 31
Revision 30 as of 2013-12-14 12:44:26
Size: 6628
Editor: MarcelKinard
Comment: added entry for CB-5646
Revision 31 as of 2014-01-31 17:17:09
Size: 6554
Editor: BasBosman
Comment: Updated and fixed a few links, disabled autolinking where it isn't wanted and removed a dead link.
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
|| Android - Remove set*Property() methods and SetFullscreen || 3.4.0 || April 2014 || https://issues.apache.org/jira/browse/CB-5646 || || Android - Remove set*Property() methods and !SetFullscreen || 3.4.0 || April 2014 || https://issues.apache.org/jira/browse/CB-5646 ||
Line 20: Line 20:
|| iOS - config.xml EnableLocation preference removal || 2.6.0 || July 2013 / 3.0.0 || https://issues.apache.org/jira/browse/CB-2608 || || iOS - config.xml !EnableLocation preference removal || 2.6.0 || July 2013 / 3.0.0 || https://issues.apache.org/jira/browse/CB-2608 ||
Line 29: Line 29:
|| Android - CordovaInterface.getContext() || 2.0.0 || December 2012 || https://issues.apache.org/jira/browse/CB-2196||
|| Android - CordovaInterface.cancelLoadUrl() || 2.0.0 || December 2012 || https://issues.apache.org/jira/browse/CB-2197||
|| Android - !CordovaInterface.getContext() || 2.0.0 || December 2012 || https://issues.apache.org/jira/browse/CB-2196||
|| Android - !CordovaInterface.cancelLoadUrl() || 2.0.0 || December 2012 || https://issues.apache.org/jira/browse/CB-2197||
Line 33: Line 33:
|| Android - org.apache.cordova.api.Plugin in favour of org.apache.cordova.api.CordovaPlugin || 2.3.0 || May 2013 || https://issues.apache.org/jira/browse/CB-2202|| || Android - org.apache.cordova.api.Plugin in favour of org.apache.cordova.api.!CordovaPlugin || 2.3.0 || May 2013 || https://issues.apache.org/jira/browse/CB-2202||
Line 41: Line 41:
https://github.com/apache/incubator-cordova-ios/blob/master/guides/Cordova%20Plugin%20Upgrade%20Guide.md

https://github.com/phonegap/phonegap-plugins/blob/master/iOS/README.md
https://github.com/apache/cordova-ios/blob/master/guides/Cordova%20Plugin%20Upgrade%20Guide.md
Line 61: Line 59:
Please also read the updated [[http://docs.phonegap.com/en/3.0.0/guide_platforms_android_plugin.md.html#Android%20Plugins|Android Plugin Guide]], since the threading details have changed. Please also read the updated [[http://docs.phonegap.com/en/3.3.0/guide_platforms_android_plugin.md.html#Android%20Plugins|Android Plugin Guide]], since the threading details have changed.
Line 76: Line 74:
CordovaInterface may not be a Context object, therefore all plugins that use a context object ctx should use the new !CordovaInterface may not be a Context object, therefore all plugins that use a context object ctx should use the new
Line 83: Line 81:
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. 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.
Line 92: Line 90:
The ultimate purpose of PhoneGap is to cease to exist. The ultimate purpose of !PhoneGap is to cease to exist.
Line 94: Line 92:
-- "PhoneGap Beliefs, Goals, and Philosophy" -- "!PhoneGap Beliefs, Goals, and Philosophy"

Deprecation Policy

Apache Cordova follows a MAJOR.MINOR.PATCH version schema.

  1. All public API method signatures will remain available between MAJOR releases. A signature is considered public if it is documented in the Cordova docs.
  2. All JS signatures that are slated for deprecation will have deprecation notices added via console.log to give developers sufficient warning.
  3. 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.
  4. This page is for upcoming deprecations. This policy first came into place with Android 2.0.0.
  5. 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 set*Property() methods and SetFullscreen

3.4.0

April 2014

https://issues.apache.org/jira/browse/CB-5646

Plugman - remove support for <plugins-plist> elements

3.1

3.4

https://issues.apache.org/jira/browse/CB-4455 and https://issues.apache.org/jira/browse/CB-4456

Android - Remove Froyo Support

2.8.0

July 2013

https://issues.apache.org/jira/browse/CB-3281

All - change <plugin> to <feature> in config.xml

2.8.0

July 2013 / 3.0.0

https://issues.apache.org/jira/browse/CB-3172

iOS - remove CDVViewController.useSplashScreen property

2.5.0

July 2013 / 3.0.0

https://issues.apache.org/jira/browse/CB-4145

iOS - change CDVConnection ReachableViaWWAN return from '2g' to 'cellular'

2.6.0

July 2013 / 3.0.0

https://issues.apache.org/jira/browse/CB-2686

iOS - config.xml EnableLocation preference removal

2.6.0

July 2013 / 3.0.0

https://issues.apache.org/jira/browse/CB-2608

iOS - CDVURLProtocol registerPGHttpURLProtocol method removal

2.0.0

Jan 2013

https://issues.apache.org/jira/browse/CB-2191

iOS - CDVURLProtocol registerURLProtocol method removal

2.0.0

Jan 2013

https://issues.apache.org/jira/browse/CB-2192

iOS - CDVViewController invokeString property removal

2.0.0

Jan 2013

https://issues.apache.org/jira/browse/CB-2193

iOS - CDVCommandDelegate registerPlugin method removal

2.2.0

April 2013

https://issues.apache.org/jira/browse/CB-2194

iOS - BackupWebStorage Cordova.plist property change from boolean to string

2.2.0

April 2013

https://issues.apache.org/jira/browse/CB-2195

iOS - window.Settings (CDVDevice)

2.5.0

August 2013

https://issues.apache.org/jira/browse/CB-2433

Android - backHistory removal

2.2.0

April 2013

https://issues.apache.org/jira/browse/CB-2198

Android - exec() returns the success payload when the call completes synchronously

2.2.0

April 2013

https://issues.apache.org/jira/browse/CB-2199

Android - CordovaInterface.getContext()

2.0.0

December 2012

https://issues.apache.org/jira/browse/CB-2196

Android - CordovaInterface.cancelLoadUrl()

2.0.0

December 2012

https://issues.apache.org/jira/browse/CB-2197

Android - device.name

2.3.0

May 2013

https://issues.apache.org/jira/browse/CB-2200

Android - OS versions 2.1 and 3.x

2.3.0

May 2013

https://issues.apache.org/jira/browse/CB-2201

Android - org.apache.cordova.api.Plugin in favour of org.apache.cordova.api.CordovaPlugin

2.3.0

May 2013

https://issues.apache.org/jira/browse/CB-2202

a few tips on what to do with deprecated code

Cordova Plugin Upgrade Guide

Cordova Plugin Upgrade Guide

https://github.com/apache/cordova-ios/blob/master/guides/Cordova%20Plugin%20Upgrade%20Guide.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 {/*...*/}

Please also read the updated Android Plugin Guide, since the threading details have changed.

If you want don't care about updating and just want your plugin to "work", you could drop a copy of the Plugin and LegacyContext shims into your project.

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/

DeprecationPolicy (last edited 2014-01-31 17:17:09 by BasBosman)