feat: 新增iOS token截取,并回调到flutter业务层
This commit is contained in:
parent
9ca61b40d8
commit
807ddb8e39
@ -620,13 +620,16 @@ static NSMutableArray<FlutterResult>* getRidResults;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
|
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
|
||||||
NSDictionary *tokenInfo = @{
|
NSString *tokenString = [self hexStringFromData:deviceToken];
|
||||||
|
NSLog(@"jpush didRegisterForRemoteNotificationsWithDeviceToken token: %@", tokenString);
|
||||||
|
NSDictionary *params = @{
|
||||||
@"code" : @0,
|
@"code" : @0,
|
||||||
@"cmd" : @100,
|
@"cmd" : @100,
|
||||||
@"token" : [self hexStringFromData:deviceToken],
|
@"token" : tokenString,
|
||||||
@"platform" : @7,
|
@"platform" : @7,
|
||||||
};
|
};
|
||||||
[_channel invokeMethod:@"onCommandResult" arguments:tokenInfo];
|
NSLog(@"jpush onCommandResult params: %@", params);
|
||||||
|
[_channel invokeMethod:@"onCommandResult" arguments:params];
|
||||||
[JPUSHService registerDeviceToken:deviceToken];
|
[JPUSHService registerDeviceToken:deviceToken];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user