You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2016/10/05 20:03:51 UTC
ios commit: CB-11957 - Update docs for remote/local notifications
removed in cordova-ios-4.0
Repository: cordova-ios
Updated Branches:
refs/heads/master a47b9d9ff -> 636113f04
CB-11957 - Update docs for remote/local notifications removed in cordova-ios-4.0
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/636113f0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/636113f0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/636113f0
Branch: refs/heads/master
Commit: 636113f047ee2c7dae742dff2beafae2121ceb62
Parents: a47b9d9
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Oct 5 11:07:42 2016 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Oct 5 13:03:17 2016 -0700
----------------------------------------------------------------------
CordovaLib/Classes/Public/CDVPlugin.h | 15 +++++++++++----
CordovaLib/Classes/Public/CDVPlugin.m | 11 +----------
guides/API changes in 4.0.md | 8 ++++++++
3 files changed, 20 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/636113f0/CordovaLib/Classes/Public/CDVPlugin.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVPlugin.h b/CordovaLib/Classes/Public/CDVPlugin.h
index b773d60..d59507a 100644
--- a/CordovaLib/Classes/Public/CDVPlugin.h
+++ b/CordovaLib/Classes/Public/CDVPlugin.h
@@ -33,9 +33,6 @@
extern NSString* const CDVPageDidLoadNotification;
extern NSString* const CDVPluginHandleOpenURLNotification;
extern NSString* const CDVPluginResetNotification;
-extern NSString* const CDVLocalNotification;
-extern NSString* const CDVRemoteNotification;
-extern NSString* const CDVRemoteNotificationError;
extern NSString* const CDVViewWillAppearNotification;
extern NSString* const CDVViewDidAppearNotification;
extern NSString* const CDVViewWillDisappearNotification;
@@ -44,6 +41,17 @@ extern NSString* const CDVViewWillLayoutSubviewsNotification;
extern NSString* const CDVViewDidLayoutSubviewsNotification;
extern NSString* const CDVViewWillTransitionToSizeNotification;
+/*
+ * The local and remote push notification functionality has been removed from the core in cordova-ios 4.x,
+ * but these constants have unfortunately have not been removed, but will be removed in 5.x.
+ *
+ * To have the same functionality as 3.x, use a third-party plugin or the experimental
+ * https://github.com/apache/cordova-plugins/tree/master/notification-rebroadcast
+ */
+extern NSString* const CDVLocalNotification CDV_DEPRECATED(4.0, "Functionality removed in 4.0, constant will be removed in 5.0");
+extern NSString* const CDVRemoteNotification CDV_DEPRECATED(4.0, "Functionality removed in 4.0, constant will be removed in 5.0");
+extern NSString* const CDVRemoteNotificationError CDV_DEPRECATED(4.0, "Functionality removed in 4.0, constant will be removed in 5.0");
+
@interface CDVPlugin : NSObject {}
@property (nonatomic, readonly, weak) UIView* webView;
@@ -68,7 +76,6 @@ extern NSString* const CDVViewWillTransitionToSizeNotification;
- (void) onResume {}
- (void) onOrientationWillChange {}
- (void) onOrientationDidChange {}
- - (void)didReceiveLocalNotification:(NSNotification *)notification;
*/
- (id)appDelegate;
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/636113f0/CordovaLib/Classes/Public/CDVPlugin.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVPlugin.m b/CordovaLib/Classes/Public/CDVPlugin.m
index af29cad..f16f7fb 100644
--- a/CordovaLib/Classes/Public/CDVPlugin.m
+++ b/CordovaLib/Classes/Public/CDVPlugin.m
@@ -92,9 +92,6 @@ NSString* const CDVViewWillTransitionToSizeNotification = @"CDVViewWillTransitio
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onOrientationWillChange) name:UIApplicationWillChangeStatusBarOrientationNotification object:nil];
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onOrientationDidChange) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
- // Added in 2.3.0
- // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveLocalNotification:) name:CDVLocalNotification object:nil];
-
// Added in 2.5.0
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pageDidLoad:) name:CDVPageDidLoadNotification object:self.webView];
//Added in 4.3.0
@@ -161,7 +158,7 @@ NSString* const CDVViewWillTransitionToSizeNotification = @"CDVViewWillTransitio
- (void)dealloc
{
- [[NSNotificationCenter defaultCenter] removeObserver:self]; // this will remove all notification unless added using addObserverForName:object:queue:usingBlock:
+ [[NSNotificationCenter defaultCenter] removeObserver:self]; // this will remove all notifications unless added using addObserverForName:object:queue:usingBlock:
}
- (id)appDelegate
@@ -169,10 +166,4 @@ NSString* const CDVViewWillTransitionToSizeNotification = @"CDVViewWillTransitio
return [[UIApplication sharedApplication] delegate];
}
-// default implementation does nothing, ideally, we are not registered for notification if we aren't going to do anything.
-// - (void)didReceiveLocalNotification:(NSNotification *)notification
-// {
-// // UILocalNotification* localNotification = [notification object]; // get the payload as a LocalNotification
-// }
-
@end
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/636113f0/guides/API changes in 4.0.md
----------------------------------------------------------------------
diff --git a/guides/API changes in 4.0.md b/guides/API changes in 4.0.md
index 6c82d52..e18357a 100644
--- a/guides/API changes in 4.0.md
+++ b/guides/API changes in 4.0.md
@@ -118,6 +118,14 @@ Properties:
@property id<CDVWebViewEngineProtocol> webViewEngine
+### Deprecated:
+
+ const CDVLocalNotification
+ const CDVRemoteNotification
+ const CDVRemoteNotificationError
+
+These constants were unfortunately not removed in 4.0, but will be removed in 5.0. Local and remote push notification functionality was removed in the core in 4.0.
+
### Modified:
@property UIView* webView
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org