浏览代码

Support cordova-ios@4 and WKWebView Engine

Sebastián Katzer 10 年之前
父节点
当前提交
9dd5e06f4d
共有 3 个文件被更改,包括 3 次插入23 次删除
  1. 1 0
      CHANGELOG.md
  2. 1 2
      plugin.xml
  3. 1 21
      src/ios/APPLocalNotification.m

+ 1 - 0
CHANGELOG.md

@@ -4,6 +4,7 @@ ChangeLog
 Please also read the [Upgrade Guide](https://github.com/katzer/cordova-plugin-local-notifications/wiki/Upgrade-Guide) for more information.
 
 #### Version 0.8.3 (not yet released)
+- Support cordova-ios@4 and the new WKWebView Engine
 - New `color` attribute for Android (Thanks to @Eusebius1920)
 - New `quarter` intervall for iOS & Android
 - Made small icon optional (Android)

+ 1 - 2
plugin.xml

@@ -21,12 +21,11 @@
     <engines>
         <engine name="cordova" version=">=3.6.0" />
         <engine name="cordova-plugman" version=">=4.3.0" />
-        <engine name="cordova-ios" version="<4.0.0" />
     </engines>
 
     <!-- dependencies -->
     <dependency id="cordova-plugin-device" />
-    <dependency id="cordova-plugin-registerusernotificationsettings" />
+    <dependency id="cordova-plugin-app-event" />
 
     <!-- info -->
     <info>

+ 1 - 21
src/ios/APPLocalNotification.m

@@ -25,7 +25,6 @@
 #import "APPLocalNotificationOptions.h"
 #import "UIApplication+APPLocalNotification.h"
 #import "UILocalNotification+APPLocalNotification.h"
-#import "AppDelegate+APPRegisterUserNotificationSettings.h"
 
 @interface APPLocalNotification ()
 
@@ -615,8 +614,7 @@
  */
 - (void) didRegisterUserNotificationSettings:(UIUserNotificationSettings*)settings
 {
-    if (_command)
-    {
+    if (_command) {
         [self hasPermission:_command];
         _command = NULL;
     }
@@ -630,25 +628,7 @@
  */
 - (void) pluginInitialize
 {
-    NSNotificationCenter* center = [NSNotificationCenter
-                                    defaultCenter];
-
     eventQueue = [[NSMutableArray alloc] init];
-
-    [center addObserver:self
-               selector:@selector(didReceiveLocalNotification:)
-                   name:CDVLocalNotification
-                 object:nil];
-
-    [center addObserver:self
-               selector:@selector(didFinishLaunchingWithOptions:)
-                   name:UIApplicationDidFinishLaunchingNotification
-                 object:nil];
-
-    [center addObserver:self
-               selector:@selector(didRegisterUserNotificationSettings:)
-                   name:UIApplicationRegisterUserNotificationSettings
-                 object:nil];
 }
 
 /**