Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
OffcnIMSDKiOS
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
opensource
OffcnIMSDKiOS
Commits
57f6ea9d
Commit
57f6ea9d
authored
Sep 09, 2020
by
zhangyunjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备ID
parent
e1fad979
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
SDGeneralDefine.h
OffcnIMSDKiOS/Common-(宏)/SDGeneralDefine.h
+2
-2
OffcnIMSDKiOS.m
OffcnIMSDKiOS/ExposedInterface-(外放接口)/OffcnIMSDKiOS.m
+2
-2
OffcnIMSocketManager.m
OffcnIMSDKiOS/ExposedInterface-(外放接口)/OffcnIMSocketManager.m
+3
-2
OffcnBaseNetworking.m
...nIMSDKiOS/Tools-(工具)/NetworkManager/OffcnBaseNetworking.m
+2
-2
No files found.
OffcnIMSDKiOS/Common-(宏)/SDGeneralDefine.h
View file @
57f6ea9d
//
//
...
@@ -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
...
...
OffcnIMSDKiOS/ExposedInterface-(外放接口)/OffcnIMSDKiOS.m
View file @
57f6ea9d
//
//
...
@@ -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
)
{
...
...
OffcnIMSDKiOS/ExposedInterface-(外放接口)/OffcnIMSocketManager.m
View file @
57f6ea9d
//
//
...
@@ -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"
];
...
...
OffcnIMSDKiOS/Tools-(工具)/NetworkManager/OffcnBaseNetworking.m
View file @
57f6ea9d
//
//
...
@@ -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
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment