ReactNative 桥接极光推送JPush(iOS、Andr

2018-12-16  本文已影响11人  Bubble_

我用的是极光2.2.0版本。关于安卓和ios的推送原理,这里不再赘述。以下是我在项目中的用法,定制化的东西会慢慢补上。

iOS

1.导入SDK 极光iOS SDK 官方文档

2.配置appDelegate

import "JPUSHService.h"
import <UserNotifications/UserNotifications.h>
import "Jpush.h"

[JPUSHService setupWithOption:launchOptions appKey:appKey channel:channel apsForProduction:isProduction advertisingIdentifier:advertisingId];

  • (void)application:(UIApplication *)application
    didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
    [JPUSHService registerDeviceToken:deviceToken];
    }

3.桥接文件Jpush

Android

上一篇 下一篇

猜你喜欢

热点阅读