Commit 57f6ea9d by zhangyunjie

设备ID

parent e1fad979
// //
...@@ -120,7 +120,7 @@ blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0] ...@@ -120,7 +120,7 @@ blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
////获取版本号 ////获取版本号
#define KAppVersion [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"] #define KAppVersion [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]
//#define KUUIDString [UIDevice currentDevice].identifierForVendor.UUIDString #define KUUIDString [UIDevice currentDevice].identifierForVendor.UUIDString
#define KRootTabBarController KKeyWindow.rootViewController #define KRootTabBarController KKeyWindow.rootViewController
......
// //
...@@ -116,7 +116,7 @@ static OffcnIMSDKiOS *liveTelecastSDK; ...@@ -116,7 +116,7 @@ static OffcnIMSDKiOS *liveTelecastSDK;
KWeakSelf KWeakSelf
NSString *msg_seqStr = [SDGeneralTool getNowSSSTimeTimestamp]; NSString *msg_seqStr = [SDGeneralTool getNowSSSTimeTimestamp];
NSString *send_timeStr = [SDGeneralTool getIMAllTimeWithSeconds:[msg_seqStr integerValue]]; NSString *send_timeStr = [SDGeneralTool getIMAllTimeWithSeconds:[msg_seqStr integerValue]];
NSString *tidStr = [NSString stringWithFormat:@"%@__%@",msg_toID,msg_seqStr]; NSString *tidStr = [NSString stringWithFormat:@"%@%@__%@",msg_toID,KUUIDString,msg_seqStr];
if (msg_type == OffcnSDKMsgTypeText) { if (msg_type == OffcnSDKMsgTypeText) {
if (!text || !text.length) { if (!text || !text.length) {
......
// //
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#import "DataSafe.h" #import "DataSafe.h"
#import "SDGeneralTool.h" #import "SDGeneralTool.h"
#import "OffcnIMZYJFMDBHandler.h" #import "OffcnIMZYJFMDBHandler.h"
#import "SDGeneralDefine.h"
@interface OffcnIMSocketManager ()<OIMCoreDelegate> @interface OffcnIMSocketManager ()<OIMCoreDelegate>
...@@ -70,7 +71,7 @@ static OffcnIMSocketManager *socketManager; ...@@ -70,7 +71,7 @@ static OffcnIMSocketManager *socketManager;
[dic setObjectOnSafe:@"ios" forKey:@"device_type"]; [dic setObjectOnSafe:@"ios" forKey:@"device_type"];
[dic setObjectOnSafe:token forKey:@"token"]; [dic setObjectOnSafe:token forKey:@"token"];
NSString *session_id = [SDGeneralTool getNowSSSTimeTimestamp]; NSString *session_id = [NSString stringWithFormat:@"%@%@",KUUIDString,[SDGeneralTool getNowSSSTimeTimestamp]];
[dic setObjectOnSafe:session_id forKey:@"session_id"]; [dic setObjectOnSafe:session_id forKey:@"session_id"];
[dic setObjectOnSafe:@"websocket" forKey:@"connection_type"]; [dic setObjectOnSafe:@"websocket" forKey:@"connection_type"];
[dic setObjectOnSafe:@"disable" forKey:@"tls"]; [dic setObjectOnSafe:@"disable" forKey:@"tls"];
......
// //
...@@ -206,7 +206,7 @@ static OffcnBaseNetworking *baseNetWorkApi; ...@@ -206,7 +206,7 @@ static OffcnBaseNetworking *baseNetWorkApi;
[manager.requestSerializer setValue:KCustomerAPPKEY forHTTPHeaderField:@"appkey"]; [manager.requestSerializer setValue:KCustomerAPPKEY forHTTPHeaderField:@"appkey"];
//随机数(最大长度128个字符) //随机数(最大长度128个字符)
NSString *nonceStr = [SDGeneralTool getNowSSSTimeTimestamp]; NSString *nonceStr = [NSString stringWithFormat:@"%@%@",KUUIDString,[SDGeneralTool getNowSSSTimeTimestamp]];
[manager.requestSerializer setValue:nonceStr forHTTPHeaderField:@"nonce"]; [manager.requestSerializer setValue:nonceStr forHTTPHeaderField:@"nonce"];
//当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的秒数(String) //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的秒数(String)
NSString *curtimeStr = [SDGeneralTool getNowSSTimeTimestamp]; NSString *curtimeStr = [SDGeneralTool getNowSSTimeTimestamp];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment