update registrationId evet

This commit is contained in:
huangminlinux 2017-10-25 11:09:46 +08:00
parent 14a40c6572
commit 184ee01d1d

View File

@ -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) {