Updated Branches: refs/heads/master afb673b76 -> db3846983
Add a macro for deprecating symbols and use it in a couple of places. Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/db384698 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/db384698 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/db384698 Branch: refs/heads/master Commit: db38469838472618edd3bc95b2d87bd4c48bffd3 Parents: 234df84 Author: Andrew Grieve <agri...@chromium.org> Authored: Fri Oct 5 16:24:50 2012 -0400 Committer: Andrew Grieve <agri...@chromium.org> Committed: Fri Oct 5 16:24:50 2012 -0400 ---------------------------------------------------------------------- CordovaLib/Classes/CDVAvailability.h | 6 ++++++ CordovaLib/Classes/CDVURLProtocol.h | 18 ++++-------------- CordovaLib/Classes/CDVViewController.h | 3 ++- 3 files changed, 12 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/db384698/CordovaLib/Classes/CDVAvailability.h ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVAvailability.h b/CordovaLib/Classes/CDVAvailability.h index 7f272dd..b24c17c 100644 --- a/CordovaLib/Classes/CDVAvailability.h +++ b/CordovaLib/Classes/CDVAvailability.h @@ -64,3 +64,9 @@ (CORDOVA_VERSION_MIN_REQUIRED / 10000), \ (CORDOVA_VERSION_MIN_REQUIRED % 10000) / 100, \ (CORDOVA_VERSION_MIN_REQUIRED % 10000) % 100] + +#ifdef __clang__ + #define CDV_DEPRECATED(version, msg) __attribute__((deprecated("Deprecated in Cordova " #version ". " msg))) +#else + #define CDV_DEPRECATED(version, msg) __attribute__((deprecated())) +#endif http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/db384698/CordovaLib/Classes/CDVURLProtocol.h ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVURLProtocol.h b/CordovaLib/Classes/CDVURLProtocol.h index 705667a..ce8df38 100644 --- a/CordovaLib/Classes/CDVURLProtocol.h +++ b/CordovaLib/Classes/CDVURLProtocol.h @@ -18,25 +18,15 @@ */ #import <Foundation/Foundation.h> +#import "CDVAvailability.h" @class CDVViewController; @interface CDVURLProtocol : NSURLProtocol {} -+ (void)registerPGHttpURLProtocol -#ifdef __clang__ - __attribute__ ((deprecated ("No longer required."))); -#else - __attribute__((deprecated())); -#endif ++ (void)registerPGHttpURLProtocol CDV_DEPRECATED (2.0, "This is now a no-op and should be removed."); ++ (void)registerURLProtocol CDV_DEPRECATED (2.0, "This is now a no-op and should be removed."); - + (void)registerURLProtocol -#ifdef __clang__ - __attribute__ ((deprecated ("No longer required."))); -#else - __attribute__((deprecated())); -#endif - - + (void)registerViewController:(CDVViewController*)viewController; ++ (void)registerViewController:(CDVViewController*)viewController; + (void)unregisterViewController:(CDVViewController*)viewController; @end http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/db384698/CordovaLib/Classes/CDVViewController.h ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVViewController.h b/CordovaLib/Classes/CDVViewController.h index c27286b..0cf717f 100644 --- a/CordovaLib/Classes/CDVViewController.h +++ b/CordovaLib/Classes/CDVViewController.h @@ -20,6 +20,7 @@ #import "CDVCordovaView.h" #import "JSONKit.h" +#import "CDVAvailability.h" #import "CDVInvokedUrlCommand.h" #import "CDVCommandDelegate.h" #import "CDVWhitelist.h" @@ -39,7 +40,7 @@ @property (nonatomic, readonly, strong) NSDictionary* settings; @property (nonatomic, readonly, strong) CDVWhitelist* whitelist; // readonly for public @property (nonatomic, readonly, assign) BOOL loadFromString; -@property (nonatomic, readwrite, copy)NSString * invokeString __attribute__((deprecated)); +@property (nonatomic, readwrite, copy)NSString * invokeString CDV_DEPRECATED(2.0, "Use window.handleOpenURL(url instead. It is called when the app is launched through a custom scheme url."); @property (nonatomic, readwrite, assign) BOOL useSplashScreen; @property (nonatomic, readonly, strong) IBOutlet UIActivityIndicatorView* activityView;