cordova-plugin-app-event
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "cordova-plugin-app-event", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Broadcasts UIApplicationDelegate events", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,2 +18,3 @@ [![npm version](https://badge.fury.io/js/cordova-plugin-app-event.svg)](http://badge.fury.io/js/cordova-plugin-app-event) | ||
#### 1. Add and install the plugin as an dependency | ||
Once you have added the plugin as an dependency you can add observers for them. | ||
@@ -27,2 +28,23 @@ | ||
#### 2. Add the protocol to the plugin's interface | ||
As first the plugin needs to indicate interest to receivce app events by adding the `APPAppEventDelegate` protocol. | ||
__Note:__ Required for version 1.2.0 or newer! | ||
```obj-c | ||
// MyCordovaPlugin.h | ||
#import "APPAppEventDelegate.h" | ||
#import <Cordova/CDVPlugin.h> | ||
@interface APPLocalNotification : CDVPlugin <APPAppEventDelegate> | ||
@implementation MyCordovaPlugin | ||
... | ||
@end | ||
``` | ||
#### 3. Add implementations for the delegated events | ||
To add an observer you need to implement the [UIApplicationDelegate Protocol][app_delegate_protocol]. Implementations from your _AppDelegate_ class don't get overwritten! | ||
@@ -29,0 +51,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
28374
10
89