feat: 统一android和ios 推送token桥接逻辑
This commit is contained in:
parent
6d720e92a2
commit
d826f6f205
@ -76,12 +76,25 @@
|
|||||||
/*
|
/*
|
||||||
* 苹果推送注册成功回调,将苹果返回的deviceToken上传到CloudPush服务器
|
* 苹果推送注册成功回调,将苹果返回的deviceToken上传到CloudPush服务器
|
||||||
*/
|
*/
|
||||||
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
|
//- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
|
||||||
|
// NSString *tokenString = [self hexStringFromData:deviceToken];
|
||||||
|
// NSLog(@"starlock didRegisterForRemoteNotificationsWithDeviceToken token: %@", tokenString);
|
||||||
|
// /// Required - 注册 DeviceToken
|
||||||
|
// [JPUSHService registerDeviceToken:deviceToken];
|
||||||
|
//
|
||||||
|
//}
|
||||||
|
|
||||||
/// Required - 注册 DeviceToken
|
- (NSString *)hexStringFromData:(NSData *)data {
|
||||||
[JPUSHService registerDeviceToken:deviceToken];
|
const unsigned char *dataBuffer = (const unsigned char *)[data bytes];
|
||||||
|
NSMutableString *hexString = [NSMutableString stringWithCapacity:data.length * 2];
|
||||||
|
|
||||||
|
for (NSInteger i = 0; i < data.length; i++) {
|
||||||
|
[hexString appendFormat:@"%02x", dataBuffer[i]];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [hexString copy];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 苹果推送注册失败回调
|
* 苹果推送注册失败回调
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -992,8 +992,8 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: main
|
ref: "807ddb8e396c2dce16919df84efe795072404dde"
|
||||||
resolved-ref: aa93729f48762421658675800be68aee27b6d8fb
|
resolved-ref: "807ddb8e396c2dce16919df84efe795072404dde"
|
||||||
url: "git@code-internal.star-lock.cn:StarlockTeam/jpush_flutter.git"
|
url: "git@code-internal.star-lock.cn:StarlockTeam/jpush_flutter.git"
|
||||||
source: git
|
source: git
|
||||||
version: "2.5.8"
|
version: "2.5.8"
|
||||||
|
|||||||
@ -214,7 +214,7 @@ dependencies:
|
|||||||
jpush_flutter:
|
jpush_flutter:
|
||||||
git:
|
git:
|
||||||
url: git@code-internal.star-lock.cn:StarlockTeam/jpush_flutter.git
|
url: git@code-internal.star-lock.cn:StarlockTeam/jpush_flutter.git
|
||||||
ref: main
|
ref: 807ddb8e396c2dce16919df84efe795072404dde
|
||||||
|
|
||||||
#视频播放器
|
#视频播放器
|
||||||
video_player: ^2.9.2
|
video_player: ^2.9.2
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user