mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2026-02-08 00:05:13 +08:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b929a8e2e | ||
|
|
d3e2e1a5d7 | ||
|
|
001ab96283 | ||
|
|
1314d33c62 | ||
|
|
22b6d9a006 | ||
|
|
0cbedb412c | ||
|
|
fbd9d63590 | ||
|
|
184ee01d1d | ||
|
|
14a40c6572 | ||
|
|
fefaaea14f | ||
|
|
d2f9959ae1 | ||
|
|
3129165d3f | ||
|
|
66932a8bc8 | ||
|
|
07c9b2b945 | ||
|
|
8811dfc002 |
@@ -1,7 +1,7 @@
|
||||
# JPush PhoneGap / Cordova Plugin
|
||||
|
||||
[](https://travis-ci.org/jpush/jpush-phonegap-plugin)
|
||||
[](https://github.com/jpush/jpush-phonegap-plugin/releases)
|
||||
[](https://github.com/jpush/jpush-phonegap-plugin/releases)
|
||||
[](https://github.com/jpush/jpush-phonegap-plugin)
|
||||
[](http://weibo.com/jpush?refer_flag=1001030101_&is_all=1)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
- 或下载到本地安装:
|
||||
|
||||
```shell
|
||||
cordova plugin add Your_Plugin_Path --variable APP_KEY=your_jpush_appkey
|
||||
cordova plugin add Your_Plugin_Path --variable APP_KEY=your_jpush_appkey
|
||||
```
|
||||
|
||||
> 在使用 Xcode 8 调试 iOS 项目时,需要先在项目配置界面的 Capabilities 中打开 Push Notifications 开关。
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# Android API 简介
|
||||
|
||||
- [注册成功事件](#注册成功事件)
|
||||
- [获取集成日志(同时适用于 iOS)](#获取集成日志同时适用于-ios)
|
||||
- [清除通知](#清除通知)
|
||||
- [设置允许推送时间](#设置允许推送时间)
|
||||
- [设置通知静默时间](#设置通知静默时间)
|
||||
@@ -9,19 +7,6 @@
|
||||
- [设置保留最近通知条数](#设置保留最近通知条数)
|
||||
- [本地通知](#本地通知)
|
||||
|
||||
## 注册成功事件
|
||||
### jpush.receiveRegistrationId
|
||||
集成了 JPush SDK 的应用程序在第一次成功注册到 JPush 服务器时,JPush 服务器会给客户端返回一个唯一的该设备的标识 - RegistrationID。
|
||||
就会触发这个事件(注意只有第一次会触发该事件,之后如果想要取到 registrationId,可以直接调用 *getRegistrationID* 方法)。
|
||||
|
||||
#### 代码示例
|
||||
|
||||
```js
|
||||
document.addEventListener('jpush.receiveRegistrationId', function (event) {
|
||||
console.log(event.registrationId)
|
||||
}, false)
|
||||
```
|
||||
|
||||
## 获取集成日志(同时适用于 iOS)
|
||||
|
||||
### API - setDebugMode
|
||||
@@ -103,7 +88,7 @@ window.JPush.setPushTime(days, startHour, endHour)
|
||||
#### 参数说明
|
||||
|
||||
- days: 数组,0 表示星期天,1 表示星期一,以此类推(7天制,数组中值的范围为 0 到 6 )。
|
||||
数组的值为 null, 表示任何时间都可以收到消息和通知,数组的 size 为 0,则表示任何时间都收不到消息和通知。
|
||||
数组的值为 null, 表示任何时间都可以收到消息和通知,数组的 size 为 0,则表示任何时间都收不到消息和通知。
|
||||
- startHour: 整形,允许推送的开始时间 (24 小时制:startHour 的范围为 0 到 23)。
|
||||
- endHour: 整形,允许推送的结束时间 (24 小时制:endHour 的范围为 0 到 23)。
|
||||
|
||||
|
||||
@@ -1,15 +1,52 @@
|
||||
# 通用 API 说明(同时适用于 Android 和 iOS 系统)
|
||||
|
||||
- [停止与恢复推送服务](#停止与恢复推送服务)
|
||||
- [注册成功事件](#注册成功事件)
|
||||
- [jpush.receiveRegistrationId](#jpushreceiveregistrationid)
|
||||
- [初始化、停止与恢复推送服务](#初始化停止与恢复推送服务)
|
||||
- [init](#init)
|
||||
- [stopPush](#stoppush)
|
||||
- [resumePush](#resumepush)
|
||||
- [isPushStopped](#ispushstopped)
|
||||
- [开启 Debug 模式](#开启-debug-模式)
|
||||
- [setDebugMode](#setdebugmode)
|
||||
- [获取 RegistrationID](#获取-registrationid)
|
||||
- [getRegistrationID](#getregistrationid)
|
||||
- [设置别名与标签](#设置别名与标签)
|
||||
- [setAlias](#setalias)
|
||||
- [deleteAlias](#deletealias)
|
||||
- [getAlias](#getalias)
|
||||
- [setTags](#settags)
|
||||
- [addTags](#addtags)
|
||||
- [deleteTags](#deletetags)
|
||||
- [cleanTags](#cleantags)
|
||||
- [getAllTags](#getalltags)
|
||||
- [checkTagBindState](#checktagbindstate)
|
||||
- [获取点击通知内容](#获取点击通知内容)
|
||||
- [event - jpush.openNotification](#event---jpushopennotification)
|
||||
- [获取通知内容](#获取通知内容)
|
||||
- [event - jpush.receiveNotification](#event---jpushreceivenotification)
|
||||
- [获取自定义消息推送内容](#获取自定义消息推送内容)
|
||||
- [event - jpush.receiveMessage](#event---jpushreceivemessage)
|
||||
- [判断系统设置中是否允许当前应用推送](#判断系统设置中是否允许当前应用推送)
|
||||
|
||||
## 停止与恢复推送服务
|
||||
### API - init
|
||||
## 注册成功事件
|
||||
|
||||
### jpush.receiveRegistrationId
|
||||
|
||||
集成了 JPush SDK 的应用程序在第一次成功注册到 JPush 服务器时,JPush 服务器会给客户端返回一个唯一的该设备的标识 - Registration ID。
|
||||
此时就会触发这个事件(注意只有第一次会触发该事件,之后如果想要取到 Registration Id,可以直接调用 `getRegistrationID` 方法)。
|
||||
|
||||
#### 代码示例
|
||||
|
||||
```js
|
||||
document.addEventListener('jpush.receiveRegistrationId', function (event) {
|
||||
console.log(event.registrationId)
|
||||
}, false)
|
||||
```
|
||||
|
||||
## 初始化、停止与恢复推送服务
|
||||
|
||||
### init
|
||||
|
||||
调用此 API,用来开启 JPush SDK 提供的推送服务。
|
||||
|
||||
@@ -27,7 +64,7 @@
|
||||
window.JPush.init()
|
||||
```
|
||||
|
||||
### API - stopPush
|
||||
### stopPush
|
||||
|
||||
- Android:
|
||||
- 开发者 App 可以通过调用停止推送服务 API 来停止极光推送服务,当又需要使用极光推送服务时,则必须要调用恢复推送服务 API。
|
||||
@@ -46,7 +83,7 @@ window.JPush.init()
|
||||
window.JPush.stopPush()
|
||||
```
|
||||
|
||||
### API - resumePush
|
||||
### resumePush
|
||||
|
||||
恢复推送服务。调用了此 API 后:
|
||||
|
||||
@@ -62,7 +99,7 @@ window.JPush.stopPush()
|
||||
window.JPush.resumePush()
|
||||
```
|
||||
|
||||
### API - isPushStopped
|
||||
### isPushStopped
|
||||
|
||||
- Android 平台:
|
||||
- 用来检查 Push Service 是否已经被停止。
|
||||
@@ -93,7 +130,7 @@ window.JPush.isPushStopped(function (result) {
|
||||
```
|
||||
|
||||
## 开启 Debug 模式
|
||||
### API - setDebugMode
|
||||
### setDebugMode
|
||||
用于开启 Debug 模式,显示更多的日志信息。
|
||||
|
||||
#### 代码示例
|
||||
@@ -103,11 +140,13 @@ window.JPush.setDebugMode(true)
|
||||
```
|
||||
|
||||
#### 参数说明
|
||||
- isOpen: true,开启 Debug 模式;false,关闭 Debug 模式,不显示错误信息之外的日志信息。
|
||||
|
||||
- true: 开启 Debug 模式;
|
||||
- false: 关闭 Debug 模式,不显示错误信息之外的日志信息。
|
||||
|
||||
## 获取 RegistrationID
|
||||
|
||||
### API - getRegistrationID
|
||||
### getRegistrationID
|
||||
|
||||
RegistrationID 定义:
|
||||
|
||||
@@ -361,7 +400,7 @@ window.JPush.checkTagBindState({ sequence: 1, tag: 'tag1' },
|
||||
|
||||
### event - jpush.openNotification
|
||||
|
||||
点击通知进入应用程序时会出发改事件。
|
||||
点击通知进入应用程序时触发。
|
||||
|
||||
#### 代码示例
|
||||
|
||||
@@ -378,8 +417,6 @@ document.addEventListener("jpush.openNotification", function (event) {
|
||||
}, false)
|
||||
```
|
||||
|
||||
> ps:点击通知后传递的 json object 保存在 window.JPush.openNotification,直接访问即可,字段示例,根据实际推送情况,可能略有差别,请注意。
|
||||
|
||||
- Android:
|
||||
|
||||
```json
|
||||
@@ -418,7 +455,7 @@ document.addEventListener("jpush.openNotification", function (event) {
|
||||
|
||||
### event - jpush.receiveNotification
|
||||
|
||||
收到通知时会触发该事件。
|
||||
收到通知时触发。
|
||||
|
||||
#### 代码示例
|
||||
|
||||
@@ -436,8 +473,6 @@ document.addEventListener("jpush.receiveNotification", function (event) {
|
||||
}, false)
|
||||
```
|
||||
|
||||
> ps:点击通知后传递的 json object 保存在 window.JPush.receiveNotification,直接访问即可,字段示例,根据实际推送情况,可能略有差别,请注意。
|
||||
|
||||
- Android:
|
||||
|
||||
```json
|
||||
@@ -476,7 +511,7 @@ document.addEventListener("jpush.receiveNotification", function (event) {
|
||||
|
||||
### event - jpush.receiveMessage
|
||||
|
||||
收到自定义消息时触发这个事件,推荐使用事件的方式传递。
|
||||
收到自定义消息时触发,推荐使用事件的方式传递。
|
||||
|
||||
但同时保留了 `receiveMessageIniOSCallback` 的回调函数,兼容以前的代码。
|
||||
|
||||
@@ -495,8 +530,6 @@ document.addEventListener("jpush.receiveMessage", function (event) {
|
||||
}, false)
|
||||
```
|
||||
|
||||
> ps:点击通知后传递的 json object 保存在 window.JPush.receiveMessage,直接访问即可,字段示例,根据实际推送情况,可能略有差别,请注意。
|
||||
|
||||
- Android:
|
||||
|
||||
```json
|
||||
@@ -545,4 +578,4 @@ window.JPush.getUserNotificationSettings(function(result) {
|
||||
} else if(result > 0) {
|
||||
// 系统设置中打开了应用推送。
|
||||
})
|
||||
```
|
||||
```
|
||||
|
||||
@@ -143,7 +143,7 @@ window.JPush.getRegistrationID(function(data) {
|
||||
|
||||
#### event - jpush.openNotification
|
||||
|
||||
点击通知启动或唤醒应用程序时会出发该事件
|
||||
点击通知启动或唤醒应用程序时会触发该事件
|
||||
|
||||
#### 代码示例
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jpush-phonegap-plugin",
|
||||
"version": "3.2.8",
|
||||
"version": "3.2.12",
|
||||
"description": "JPush for cordova plugin",
|
||||
"cordova": {
|
||||
"id": "jpush-phonegap-plugin",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
id="jpush-phonegap-plugin"
|
||||
version="3.2.8">
|
||||
version="3.2.12">
|
||||
|
||||
<name>JPush</name>
|
||||
<description>JPush for cordova plugin</description>
|
||||
|
||||
@@ -28,25 +28,23 @@
|
||||
return [self init_plus];
|
||||
}
|
||||
|
||||
-(void)fireOpenNotification:(NSTimer*)timer{
|
||||
if (SharedJPushPlugin) {
|
||||
[JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification jsString:[timer.userInfo toJsonString]];
|
||||
[timer invalidate];
|
||||
}
|
||||
}
|
||||
|
||||
NSDictionary *_launchOptions;
|
||||
-(void)applicationDidLaunch:(NSNotification *)notification{
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jpushSDKDidLoginNotification) name:kJPFNetworkDidLoginNotification object:nil];
|
||||
if (!_jpushEventCache) {
|
||||
_jpushEventCache = @{}.mutableCopy;
|
||||
}
|
||||
|
||||
[JPUSHService registrationIDCompletionHandler:^(int resCode, NSString *registrationID) {
|
||||
NSDictionary *event = @{@"registrationId": registrationID?:@""};
|
||||
[JPushPlugin fireDocumentEvent:JPushDocumentEvent_receiveRegistrationId jsString:[event toJsonString]];
|
||||
}];
|
||||
|
||||
if (notification) {
|
||||
if (notification.userInfo) {
|
||||
|
||||
if ([notification.userInfo valueForKey:UIApplicationLaunchOptionsRemoteNotificationKey]) {
|
||||
[NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(fireOpenNotification:)
|
||||
userInfo:[notification.userInfo
|
||||
valueForKey:UIApplicationLaunchOptionsRemoteNotificationKey] repeats:YES];
|
||||
[JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification jsString:[notification.userInfo toJsonString]];
|
||||
}
|
||||
|
||||
if ([notification.userInfo valueForKey:UIApplicationLaunchOptionsLocalNotificationKey]) {
|
||||
@@ -56,7 +54,7 @@ NSDictionary *_launchOptions;
|
||||
@"badge": @(localNotification.applicationIconBadgeNumber),
|
||||
@"extras":localNotification.userInfo,
|
||||
};
|
||||
[NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(fireOpenNotification:) userInfo:localNotificationEvent repeats:YES];
|
||||
[JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification jsString:[localNotificationEvent toJsonString]];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +153,12 @@ NSDictionary *_launchOptions;
|
||||
}
|
||||
|
||||
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:JPushDocumentEvent_ReceiveLocalNotification object:notification.userInfo];
|
||||
NSDictionary* localNotificationEvent = @{@"content":notification.alertBody,
|
||||
@"badge": @(notification.applicationIconBadgeNumber),
|
||||
@"extras":notification.userInfo,
|
||||
};
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:JPushDocumentEvent_ReceiveLocalNotification object:localNotificationEvent];
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
|
||||
@@ -1,100 +1,102 @@
|
||||
//
|
||||
// PushTalkPlugin.h
|
||||
// PushTalk
|
||||
//
|
||||
// Created by zhangqinghe on 13-12-13.
|
||||
//
|
||||
//
|
||||
|
||||
#import <Cordova/CDV.h>
|
||||
|
||||
@interface JPushPlugin : CDVPlugin{
|
||||
|
||||
}
|
||||
|
||||
//注册通知服务并启动 SDK
|
||||
-(void)startJPushSDK:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//以下为js中可调用接口
|
||||
//设置标签、别名
|
||||
-(void)setTags:(CDVInvokedUrlCommand*)command;
|
||||
-(void)addTags:(CDVInvokedUrlCommand*)command;
|
||||
-(void)deleteTags:(CDVInvokedUrlCommand*)command;
|
||||
-(void)cleanTags:(CDVInvokedUrlCommand*)command;
|
||||
-(void)getAllTags:(CDVInvokedUrlCommand*)command;
|
||||
-(void)checkTagBindState:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
-(void)setAlias:(CDVInvokedUrlCommand*)command;
|
||||
-(void)deleteAlias:(CDVInvokedUrlCommand*)command;
|
||||
-(void)getAlias:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//获取 RegistrationID
|
||||
-(void)getRegistrationID:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//页面统计
|
||||
-(void)startLogPageView:(CDVInvokedUrlCommand*)command;
|
||||
-(void)stopLogPageView:(CDVInvokedUrlCommand*)command;
|
||||
-(void)beginLogPageView:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//设置角标到服务器,服务器下一次发消息时,会设置成这个值
|
||||
//本接口不会改变应用本地的角标值.
|
||||
-(void)setBadge:(CDVInvokedUrlCommand*)command;
|
||||
//相当于 [setBadge:0]
|
||||
-(void)resetBadge:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//应用本地的角标值设置/获取
|
||||
-(void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command;
|
||||
-(void)getApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//停止与恢复推送
|
||||
-(void)stopPush:(CDVInvokedUrlCommand*)command;
|
||||
-(void)resumePush:(CDVInvokedUrlCommand*)command;
|
||||
-(void)isPushStopped:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//开关日志
|
||||
-(void)setDebugModeFromIos:(CDVInvokedUrlCommand*)command;
|
||||
-(void)setLogOFF:(CDVInvokedUrlCommand*)command;
|
||||
-(void)crashLogON:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//本地推送
|
||||
-(void)setLocalNotification:(CDVInvokedUrlCommand*)command;
|
||||
-(void)deleteLocalNotificationWithIdentifierKey:(CDVInvokedUrlCommand*)command;
|
||||
-(void)clearAllLocalNotifications:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//地理位置上报 [latitude,longitude]
|
||||
-(void)setLocation:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//检查用户的推送设置情况
|
||||
-(void)getUserNotificationSettings:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//ios 10 APIs
|
||||
-(void)addDismissActions:(CDVInvokedUrlCommand*)command;
|
||||
-(void)addNotificationActions:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
/*
|
||||
* 以下为js中可监听到的事件
|
||||
* jpush.openNotification 点击推送消息启动或唤醒app
|
||||
* jpush.receiveMessage 收到自定义消息
|
||||
* jpush.receiveNotification 前台收到推送
|
||||
* jpush.backgroundNotification 后台收到推送
|
||||
*/
|
||||
|
||||
# pragma mark - private
|
||||
|
||||
+(void)fireDocumentEvent:(NSString*)eventName jsString:(NSString*)jsString;
|
||||
|
||||
+(void)setupJPushSDK:(NSDictionary*)userInfo;
|
||||
|
||||
@end
|
||||
|
||||
JPushPlugin *SharedJPushPlugin;
|
||||
|
||||
@interface NSDictionary (JPush)
|
||||
-(NSString*)toJsonString;
|
||||
@end
|
||||
|
||||
@interface NSString (JPush)
|
||||
-(NSDictionary*)toDictionary;
|
||||
@end
|
||||
|
||||
|
||||
//
|
||||
// PushTalkPlugin.h
|
||||
// PushTalk
|
||||
//
|
||||
// Created by zhangqinghe on 13-12-13.
|
||||
//
|
||||
//
|
||||
|
||||
#import <Cordova/CDV.h>
|
||||
|
||||
static NSMutableDictionary *_jpushEventCache;
|
||||
|
||||
@interface JPushPlugin : CDVPlugin{
|
||||
|
||||
}
|
||||
|
||||
//注册通知服务并启动 SDK
|
||||
-(void)startJPushSDK:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//以下为js中可调用接口
|
||||
//设置标签、别名
|
||||
-(void)setTags:(CDVInvokedUrlCommand*)command;
|
||||
-(void)addTags:(CDVInvokedUrlCommand*)command;
|
||||
-(void)deleteTags:(CDVInvokedUrlCommand*)command;
|
||||
-(void)cleanTags:(CDVInvokedUrlCommand*)command;
|
||||
-(void)getAllTags:(CDVInvokedUrlCommand*)command;
|
||||
-(void)checkTagBindState:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
-(void)setAlias:(CDVInvokedUrlCommand*)command;
|
||||
-(void)deleteAlias:(CDVInvokedUrlCommand*)command;
|
||||
-(void)getAlias:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//获取 RegistrationID
|
||||
-(void)getRegistrationID:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//页面统计
|
||||
-(void)startLogPageView:(CDVInvokedUrlCommand*)command;
|
||||
-(void)stopLogPageView:(CDVInvokedUrlCommand*)command;
|
||||
-(void)beginLogPageView:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//设置角标到服务器,服务器下一次发消息时,会设置成这个值
|
||||
//本接口不会改变应用本地的角标值.
|
||||
-(void)setBadge:(CDVInvokedUrlCommand*)command;
|
||||
//相当于 [setBadge:0]
|
||||
-(void)resetBadge:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//应用本地的角标值设置/获取
|
||||
-(void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command;
|
||||
-(void)getApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//停止与恢复推送
|
||||
-(void)stopPush:(CDVInvokedUrlCommand*)command;
|
||||
-(void)resumePush:(CDVInvokedUrlCommand*)command;
|
||||
-(void)isPushStopped:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//开关日志
|
||||
-(void)setDebugModeFromIos:(CDVInvokedUrlCommand*)command;
|
||||
-(void)setLogOFF:(CDVInvokedUrlCommand*)command;
|
||||
-(void)crashLogON:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//本地推送
|
||||
-(void)setLocalNotification:(CDVInvokedUrlCommand*)command;
|
||||
-(void)deleteLocalNotificationWithIdentifierKey:(CDVInvokedUrlCommand*)command;
|
||||
-(void)clearAllLocalNotifications:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//地理位置上报 [latitude,longitude]
|
||||
-(void)setLocation:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//检查用户的推送设置情况
|
||||
-(void)getUserNotificationSettings:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
//ios 10 APIs
|
||||
-(void)addDismissActions:(CDVInvokedUrlCommand*)command;
|
||||
-(void)addNotificationActions:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
/*
|
||||
* 以下为js中可监听到的事件
|
||||
* jpush.openNotification 点击推送消息启动或唤醒app
|
||||
* jpush.receiveMessage 收到自定义消息
|
||||
* jpush.receiveNotification 前台收到推送
|
||||
* jpush.backgroundNotification 后台收到推送
|
||||
*/
|
||||
|
||||
# pragma mark - private
|
||||
|
||||
+(void)fireDocumentEvent:(NSString*)eventName jsString:(NSString*)jsString;
|
||||
|
||||
+(void)setupJPushSDK:(NSDictionary*)userInfo;
|
||||
|
||||
@end
|
||||
|
||||
static JPushPlugin *SharedJPushPlugin;
|
||||
|
||||
@interface NSDictionary (JPush)
|
||||
-(NSString*)toJsonString;
|
||||
@end
|
||||
|
||||
@interface NSString (JPush)
|
||||
-(NSDictionary*)toDictionary;
|
||||
@end
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user