From 184ee01d1db9022bce4564e9b368bc9d47849cd8 Mon Sep 17 00:00:00 2001 From: huangminlinux <380108184@qq.com> Date: Wed, 25 Oct 2017 11:09:46 +0800 Subject: [PATCH] update registrationId evet --- src/ios/Plugins/AppDelegate+JPush.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ios/Plugins/AppDelegate+JPush.m b/src/ios/Plugins/AppDelegate+JPush.m index efc08fa..301638e 100644 --- a/src/ios/Plugins/AppDelegate+JPush.m +++ b/src/ios/Plugins/AppDelegate+JPush.m @@ -35,7 +35,10 @@ NSDictionary *_launchOptions; _jpushEventCache = @{}.mutableCopy; } - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jpushSDKDidLoginNotification) name:kJPFNetworkDidRegisterNotification object:nil]; + [JPUSHService registrationIDCompletionHandler:^(int resCode, NSString *registrationID) { + NSDictionary *event = @{@"registrationId": registrationID?:@""}; + [JPushPlugin fireDocumentEvent:JPushDocumentEvent_receiveRegistrationId jsString:[event toJsonString]]; + }]; if (notification) { if (notification.userInfo) {