cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [4/18] ios commit: added local notification #define, and stubbed method
Date Thu, 06 Dec 2012 22:23:46 GMT
added local notification #define, and stubbed method


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/1ba170ec
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/1ba170ec
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/1ba170ec

Branch: refs/heads/master
Commit: 1ba170eced2af3979dd3cb91e8bb43a668948c28
Parents: b00d496
Author: purplecabbage <purplecabbage@gmail.com>
Authored: Thu Dec 6 12:00:51 2012 -0800
Committer: purplecabbage <purplecabbage@gmail.com>
Committed: Thu Dec 6 12:00:51 2012 -0800

----------------------------------------------------------------------
 CordovaLib/Classes/CDVPlugin.h |    2 ++
 CordovaLib/Classes/CDVPlugin.m |   10 ++++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1ba170ec/CordovaLib/Classes/CDVPlugin.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin.h b/CordovaLib/Classes/CDVPlugin.h
index 3c0769d..8c59a2b 100644
--- a/CordovaLib/Classes/CDVPlugin.h
+++ b/CordovaLib/Classes/CDVPlugin.h
@@ -25,6 +25,7 @@
 
 #define CDVPluginHandleOpenURLNotification @"CDVPluginHandleOpenURLNotification"
 #define CDVPluginResetNotification @"CDVPluginResetNotification"
+#define CDVLocalNotification @"CDVLocalNotification"
 
 @interface CDVPlugin : NSObject {}
 
@@ -50,6 +51,7 @@
  - (void) onResume {}
  - (void) onOrientationWillChange {}
  - (void) onOrientationDidChange {}
+ - (void)didReceiveLocalNotification:(NSNotification *)notification;
  */
 
 - (id)appDelegate;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1ba170ec/CordovaLib/Classes/CDVPlugin.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin.m b/CordovaLib/Classes/CDVPlugin.m
index 9d83f27..53023c7 100644
--- a/CordovaLib/Classes/CDVPlugin.m
+++ b/CordovaLib/Classes/CDVPlugin.m
@@ -59,6 +59,10 @@
          [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResume)
name:UIApplicationWillEnterForegroundNotification object:nil];
          [[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]; 
+         
          */
     }
     return self;
@@ -135,4 +139,10 @@
     return @"";
 }
 
+// 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


Mime
View raw message