From: liangzhenying <867174124@qq.com> Date: Fri, 16 May 2025 08:42:42 +0000 (+0800) Subject: 字节鉴权日志修改 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=80181287c0c4eb1d48433c79d5ebdb6509cf87ef;p=mirrors%2FMouseSdk-MacOS.git 字节鉴权日志修改 --- diff --git a/MouseSdk/AiMouseSdk/ByteDance/ByteDanceSdk.m b/MouseSdk/AiMouseSdk/ByteDance/ByteDanceSdk.m index 403d98b..9fa3d73 100644 --- a/MouseSdk/AiMouseSdk/ByteDance/ByteDanceSdk.m +++ b/MouseSdk/AiMouseSdk/ByteDance/ByteDanceSdk.m @@ -33,7 +33,7 @@ } - (void)initSdk{ - [LogManager log:@"开始初始化"]; + [LogManager log:@"[byte]开始初始化"]; stb_app_printf_str_register(cus_printf_str); // NSString *appId = @"tis_test"; // NSString *appId = @"app_10dyx2ai21r2qkar"; @@ -79,7 +79,7 @@ void STB_STDCALL cus_printf_str(char* str) { dispatch_async(dispatch_get_main_queue(), ^{ - NSString *logStr = [NSString stringWithFormat:@"%s", str]; + NSString *logStr = [NSString stringWithFormat:@"[byte]%s", str]; [LogManager log:logStr]; }); @@ -89,23 +89,23 @@ static void cust_event_callback_func(uint32_t type,uint8_t *report, uint32_t dat dispatch_async(dispatch_get_main_queue(), ^{ switch (type) { case STB_DYNREG_SUCCESS: - [LogManager log:@"STB_DYNREG_SUCCESS"]; + [LogManager log:@"[byte]STB_DYNREG_SUCCESS"]; break; case STB_DYNREG_FAIL: - [LogManager log:@"STB_DYNREG_FAIL"]; + [LogManager log:@"[byte]STB_DYNREG_FAIL"]; break; case STB_MQTT_CONNECT_SUCCESS: - [LogManager log:@"STB_MQTT_CONNECT_SUCCESS"]; + [LogManager log:@"[byte]STB_MQTT_CONNECT_SUCCESS"]; stb_app_get_token_async(); break; case STB_MQTT_CONNECT_FAIL: - [LogManager log:@"STB_MQTT_CONNECT_FAIL"]; + [LogManager log:@"[byte]STB_MQTT_CONNECT_FAIL"]; break; case STB_MQTT_CONNECT_OFFLINE: - [LogManager log:@"STB_MQTT_CONNECT_OFFLINE"]; + [LogManager log:@"[byte]STB_MQTT_CONNECT_OFFLINE"]; break; case STB_MQTT_CONNECT_ONLINE: - [LogManager log:@"STB_MQTT_CONNECT_ONLINE"]; + [LogManager log:@"[byte]STB_MQTT_CONNECT_ONLINE"]; break; case STB_DM_DATA_ARRIVED_TOKEN: @@ -113,7 +113,7 @@ static void cust_event_callback_func(uint32_t type,uint8_t *report, uint32_t dat //token NSData *data = [[NSData alloc] initWithBytes:report length:data_len]; [ByteDanceSdk shared].info.token = [AiMouseTools dataToUtf8String:data]; - [LogManager log:[NSString stringWithFormat:@"STB_DM_DATA_ARRIVED_TOKEN = %@",[ByteDanceSdk shared].info.token]]; + [LogManager log:[NSString stringWithFormat:@"[byte]STB_DM_DATA_ARRIVED_TOKEN = %@",[ByteDanceSdk shared].info.token]]; [[ByteDanceSdk shared] checkAuthSuccess]; break; } @@ -131,7 +131,7 @@ static void cust_event_callback_func(uint32_t type,uint8_t *report, uint32_t dat //host NSData *data = [[NSData alloc] initWithBytes:report length:data_len]; [ByteDanceSdk shared].info.host = [AiMouseTools dataToUtf8String:data]; - [LogManager log:[NSString stringWithFormat:@"STB_DM_DATA_ARRIVED_HOST = %@",[ByteDanceSdk shared].info.host]]; + [LogManager log:[NSString stringWithFormat:@"[byte]STB_DM_DATA_ARRIVED_HOST = %@",[ByteDanceSdk shared].info.host]]; [[ByteDanceSdk shared] checkAuthSuccess]; break; } @@ -140,26 +140,26 @@ static void cust_event_callback_func(uint32_t type,uint8_t *report, uint32_t dat //params NSData *data = [[NSData alloc] initWithBytes:report length:data_len]; [ByteDanceSdk shared].info.urlParams = [AiMouseTools dataToUtf8String:data]; - [LogManager log:[NSString stringWithFormat:@"STB_DM_DATA_ARRIVED_PARAMS_SIGN = %@",[ByteDanceSdk shared].info.urlParams]]; + [LogManager log:[NSString stringWithFormat:@"[byte]STB_DM_DATA_ARRIVED_PARAMS_SIGN = %@",[ByteDanceSdk shared].info.urlParams]]; [[ByteDanceSdk shared] checkAuthSuccess]; break; } default: - [LogManager log:@"UNKNOWN_MSG"]; + [LogManager log:@"[byte] UNKNOWN_MSG"]; break; } NSData *data = [[NSData alloc] initWithBytes:report length:data_len]; - [LogManager log:[NSString stringWithFormat:@"event_callback type = %u,data = %@",type,[AiMouseTools dataToHexString:data]]]; - [LogManager log:[NSString stringWithFormat:@"str = %@",[AiMouseTools dataToUtf8String:data]]]; + [LogManager log:[NSString stringWithFormat:@"[byte] type = %u,data = %@",type,[AiMouseTools dataToHexString:data]]]; + [LogManager log:[NSString stringWithFormat:@"[byte]%@",[AiMouseTools dataToUtf8String:data]]]; }); } int32_t STB_STDCALL cus_hal_send_data2device(uint8_t* data, uint32_t len) { NSData *cmdData = [[NSData alloc] initWithBytes:data length:len]; - [LogManager log:[NSString stringWithFormat:@"send2device = %@",[AiMouseTools dataToHexString_placeholder:cmdData]]]; + [LogManager log:[NSString stringWithFormat:@"[byte]send2device = %@",[AiMouseTools dataToHexString_placeholder:cmdData]]]; NSMutableData *fullData = [[NSMutableData alloc] init]; uint8_t head[] = { 0x2d, 0x24, 0x24}; diff --git a/MouseSdk/MouseSdk.xcworkspace/xcuserdata/yaozuopan.xcuserdatad/UserInterfaceState.xcuserstate b/MouseSdk/MouseSdk.xcworkspace/xcuserdata/yaozuopan.xcuserdatad/UserInterfaceState.xcuserstate index 9fcb43c..6f65429 100644 Binary files a/MouseSdk/MouseSdk.xcworkspace/xcuserdata/yaozuopan.xcuserdatad/UserInterfaceState.xcuserstate and b/MouseSdk/MouseSdk.xcworkspace/xcuserdata/yaozuopan.xcuserdatad/UserInterfaceState.xcuserstate differ