Commit 3b23ac3a9928faea374923ff4ccb8e75939bcf4f

Authored by 王军波
1 parent ddcc064b

修改,已经去掉spid

CNLiveChatSDKDemo/CNLiveChatManager.framework/CNLiveChatManager
No preview for this file type
CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveChatMessage.h
@@ -20,21 +20,31 @@ @@ -20,21 +20,31 @@
20 /** 20 /**
21 目标ID(消息来自聊天室的ID / 接收者ID) 21 目标ID(消息来自聊天室的ID / 接收者ID)
22 */ 22 */
23 -@property (nonatomic, assign) NSString *targetId; 23 +@property (nonatomic, copy) NSString *targetId;
24 24
25 /** 25 /**
26 消息ID(本地存储的消息的唯一值(数据库索引唯一值)) 26 消息ID(本地存储的消息的唯一值(数据库索引唯一值))
27 */ 27 */
28 -@property (nonatomic, assign) NSString *messageId; 28 +@property (nonatomic, copy) NSString *messageId;
29 29
30 /** 30 /**
31 消息内容 31 消息内容
32 */ 32 */
33 -@property (nonatomic, strong) NSString *messageContent; 33 +@property (nonatomic, copy) NSString *messageContent;
34 34
35 /** 35 /**
36 发送者的用户信息(userId, name, portraitUri) 36 发送者的用户信息(userId, name, portraitUri)
37 */ 37 */
38 @property (nonatomic, strong) CNLiveChatUserInfo *userInfo; 38 @property (nonatomic, strong) CNLiveChatUserInfo *userInfo;
39 39
  40 +/**
  41 + 消息的接收时间(Unix时间戳、毫秒)
  42 + */
  43 +@property(nonatomic, assign) long long receivedTime;
  44 +
  45 +/**
  46 + 消息的发送时间(Unix时间戳、毫秒)
  47 + */
  48 +@property(nonatomic, assign) long long sentTime;
  49 +
40 @end 50 @end
CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveChatStatusDefine.h
@@ -245,6 +245,16 @@ typedef NS_ENUM(NSInteger, CNLiveChatErrorCode) { @@ -245,6 +245,16 @@ typedef NS_ENUM(NSInteger, CNLiveChatErrorCode) {
245 CNLive_ERRORCODE_BY_AUTHENTICATIONERROR = 303, 245 CNLive_ERRORCODE_BY_AUTHENTICATIONERROR = 303,
246 246
247 /*! 247 /*!
  248 + 不合法的 targetId
  249 + */
  250 + CNLive_ERRORCODE_BY_TARGETIDERROR = 304,
  251 +
  252 + /*!
  253 + 不合法的 会话类型 type
  254 + */
  255 + CNLive_ERRORCODE_BY_CONVERSATIONTYPEERROR = 305,
  256 +
  257 + /*!
248 已被对方加入黑名单 258 已被对方加入黑名单
249 */ 259 */
250 CNLive_REJECTED_BY_BLACKLIST = 405, 260 CNLive_REJECTED_BY_BLACKLIST = 405,
CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveChatUserInfo.h
@@ -13,17 +13,17 @@ @@ -13,17 +13,17 @@
13 /*! 13 /*!
14 用户ID(一旦以一个用户ID连接到服务器,就不能再修改用户ID了,如果修改也会被忽略) 14 用户ID(一旦以一个用户ID连接到服务器,就不能再修改用户ID了,如果修改也会被忽略)
15 */ 15 */
16 -@property(nonatomic, strong, readonly) NSString *userId; 16 +@property(nonatomic, copy, readonly) NSString *userId;
17 17
18 /*! 18 /*!
19 用户名称 19 用户名称
20 */ 20 */
21 -@property(nonatomic, strong) NSString *name; 21 +@property(nonatomic, copy) NSString *name;
22 22
23 /*! 23 /*!
24 用户头像的URL 24 用户头像的URL
25 */ 25 */
26 -@property(nonatomic, strong) NSString *portraitUri; 26 +@property(nonatomic, copy) NSString *portraitUri;
27 27
28 /*! 28 /*!
29 用户信息的初始化方法, 29 用户信息的初始化方法,
CNLiveChatSDKDemo/CNLiveChatSDKDemo.xcodeproj/project.pbxproj
@@ -10,12 +10,12 @@ @@ -10,12 +10,12 @@
10 D231941F1E70101500111C3B /* MessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D231941E1E70101500111C3B /* MessageModel.m */; }; 10 D231941F1E70101500111C3B /* MessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D231941E1E70101500111C3B /* MessageModel.m */; };
11 D231C8A61E6FFC2700EAC427 /* ChatRoomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D231C8A51E6FFC2700EAC427 /* ChatRoomViewController.m */; }; 11 D231C8A61E6FFC2700EAC427 /* ChatRoomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D231C8A51E6FFC2700EAC427 /* ChatRoomViewController.m */; };
12 D231C8A91E6FFD3100EAC427 /* PrivateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D231C8A81E6FFD3100EAC427 /* PrivateViewController.m */; }; 12 D231C8A91E6FFD3100EAC427 /* PrivateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D231C8A81E6FFD3100EAC427 /* PrivateViewController.m */; };
13 - D25BF8671E7A6519007FB138 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8661E7A6519007FB138 /* CNLiveMsgTools.framework */; };  
14 - D25BF8691E7A6520007FB138 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8681E7A6520007FB138 /* CNLiveChatManager.framework */; };  
15 - D25BF86A1E7A6686007FB138 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8661E7A6519007FB138 /* CNLiveMsgTools.framework */; };  
16 - D25BF86B1E7A6686007FB138 /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8661E7A6519007FB138 /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };  
17 - D25BF86C1E7A6688007FB138 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8681E7A6520007FB138 /* CNLiveChatManager.framework */; };  
18 - D25BF86D1E7A6688007FB138 /* CNLiveChatManager.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8681E7A6520007FB138 /* CNLiveChatManager.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 13 + D23ECC581E824796007D849E /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D23ECC571E824796007D849E /* CNLiveMsgTools.framework */; };
  14 + D23ECC5A1E8247A4007D849E /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D23ECC591E8247A4007D849E /* CNLiveChatManager.framework */; };
  15 + D23ECC5B1E8247AA007D849E /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D23ECC571E824796007D849E /* CNLiveMsgTools.framework */; };
  16 + D23ECC5C1E8247AA007D849E /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D23ECC571E824796007D849E /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
  17 + D23ECC5D1E8247AC007D849E /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D23ECC591E8247A4007D849E /* CNLiveChatManager.framework */; };
  18 + D23ECC5E1E8247AC007D849E /* CNLiveChatManager.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D23ECC591E8247A4007D849E /* CNLiveChatManager.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
19 D264D5A51E6FDE02002CDF41 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D264D5A41E6FDE02002CDF41 /* main.m */; }; 19 D264D5A51E6FDE02002CDF41 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D264D5A41E6FDE02002CDF41 /* main.m */; };
20 D264D5A81E6FDE02002CDF41 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D264D5A71E6FDE02002CDF41 /* AppDelegate.m */; }; 20 D264D5A81E6FDE02002CDF41 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D264D5A71E6FDE02002CDF41 /* AppDelegate.m */; };
21 D264D5AB1E6FDE02002CDF41 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D264D5AA1E6FDE02002CDF41 /* ViewController.m */; }; 21 D264D5AB1E6FDE02002CDF41 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D264D5AA1E6FDE02002CDF41 /* ViewController.m */; };
@@ -31,8 +31,8 @@ @@ -31,8 +31,8 @@
31 dstPath = ""; 31 dstPath = "";
32 dstSubfolderSpec = 10; 32 dstSubfolderSpec = 10;
33 files = ( 33 files = (
34 - D25BF86B1E7A6686007FB138 /* CNLiveMsgTools.framework in Embed Frameworks */,  
35 - D25BF86D1E7A6688007FB138 /* CNLiveChatManager.framework in Embed Frameworks */, 34 + D23ECC5C1E8247AA007D849E /* CNLiveMsgTools.framework in Embed Frameworks */,
  35 + D23ECC5E1E8247AC007D849E /* CNLiveChatManager.framework in Embed Frameworks */,
36 ); 36 );
37 name = "Embed Frameworks"; 37 name = "Embed Frameworks";
38 runOnlyForDeploymentPostprocessing = 0; 38 runOnlyForDeploymentPostprocessing = 0;
@@ -46,8 +46,8 @@ @@ -46,8 +46,8 @@
46 D231C8A51E6FFC2700EAC427 /* ChatRoomViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatRoomViewController.m; sourceTree = "<group>"; }; 46 D231C8A51E6FFC2700EAC427 /* ChatRoomViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatRoomViewController.m; sourceTree = "<group>"; };
47 D231C8A71E6FFD3100EAC427 /* PrivateViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrivateViewController.h; sourceTree = "<group>"; }; 47 D231C8A71E6FFD3100EAC427 /* PrivateViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrivateViewController.h; sourceTree = "<group>"; };
48 D231C8A81E6FFD3100EAC427 /* PrivateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrivateViewController.m; sourceTree = "<group>"; }; 48 D231C8A81E6FFD3100EAC427 /* PrivateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrivateViewController.m; sourceTree = "<group>"; };
49 - D25BF8661E7A6519007FB138 /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; };  
50 - D25BF8681E7A6520007FB138 /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; }; 49 + D23ECC571E824796007D849E /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; };
  50 + D23ECC591E8247A4007D849E /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; };
51 D264D5A01E6FDE02002CDF41 /* CNLiveChatSDKDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNLiveChatSDKDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 51 D264D5A01E6FDE02002CDF41 /* CNLiveChatSDKDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNLiveChatSDKDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
52 D264D5A41E6FDE02002CDF41 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 52 D264D5A41E6FDE02002CDF41 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
53 D264D5A61E6FDE02002CDF41 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; 53 D264D5A61E6FDE02002CDF41 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
@@ -66,10 +66,10 @@ @@ -66,10 +66,10 @@
66 isa = PBXFrameworksBuildPhase; 66 isa = PBXFrameworksBuildPhase;
67 buildActionMask = 2147483647; 67 buildActionMask = 2147483647;
68 files = ( 68 files = (
69 - D25BF8671E7A6519007FB138 /* CNLiveMsgTools.framework in Frameworks */,  
70 - D25BF8691E7A6520007FB138 /* CNLiveChatManager.framework in Frameworks */,  
71 - D25BF86A1E7A6686007FB138 /* CNLiveMsgTools.framework in Frameworks */,  
72 - D25BF86C1E7A6688007FB138 /* CNLiveChatManager.framework in Frameworks */, 69 + D23ECC5B1E8247AA007D849E /* CNLiveMsgTools.framework in Frameworks */,
  70 + D23ECC581E824796007D849E /* CNLiveMsgTools.framework in Frameworks */,
  71 + D23ECC5A1E8247A4007D849E /* CNLiveChatManager.framework in Frameworks */,
  72 + D23ECC5D1E8247AC007D849E /* CNLiveChatManager.framework in Frameworks */,
73 ); 73 );
74 runOnlyForDeploymentPostprocessing = 0; 74 runOnlyForDeploymentPostprocessing = 0;
75 }; 75 };
@@ -101,8 +101,8 @@ @@ -101,8 +101,8 @@
101 D264D5971E6FDE02002CDF41 = { 101 D264D5971E6FDE02002CDF41 = {
102 isa = PBXGroup; 102 isa = PBXGroup;
103 children = ( 103 children = (
104 - D25BF8681E7A6520007FB138 /* CNLiveChatManager.framework */,  
105 - D25BF8661E7A6519007FB138 /* CNLiveMsgTools.framework */, 104 + D23ECC591E8247A4007D849E /* CNLiveChatManager.framework */,
  105 + D23ECC571E824796007D849E /* CNLiveMsgTools.framework */,
106 D264D5A21E6FDE02002CDF41 /* CNLiveChatSDKDemo */, 106 D264D5A21E6FDE02002CDF41 /* CNLiveChatSDKDemo */,
107 D264D5A11E6FDE02002CDF41 /* Products */, 107 D264D5A11E6FDE02002CDF41 /* Products */,
108 ); 108 );
CNLiveChatSDKDemo/CNLiveChatSDKDemo/ChatRoomViewController.m
@@ -170,10 +170,10 @@ static NSString *cellId = @&quot;cellId&quot;; @@ -170,10 +170,10 @@ static NSString *cellId = @&quot;cellId&quot;;
170 #pragma mark - CNLiveChatManagerDelegate !!!!!!!!!!!!!!!!!!!!!!!!!! 170 #pragma mark - CNLiveChatManagerDelegate !!!!!!!!!!!!!!!!!!!!!!!!!!
171 - (void)onReceived:(CNLiveChatMessage *)message { 171 - (void)onReceived:(CNLiveChatMessage *)message {
172 172
173 - NSLog(@"收到消息类型:%lu,消息ID:%@,消息内容:%@,消息发送者信息:%@",(unsigned long)message.conversationType,message.targetId,message.messageContent,message.userInfo); 173 + NSLog(@"收到消息类型:%lu,消息ID:%@,消息内容:%@,消息发送者信息:%@,消息ID:%@",(unsigned long)message.conversationType,message.targetId,message.messageContent,message.userInfo,message.messageId);
174 174
175 // 只显示本聊天室信息 175 // 只显示本聊天室信息
176 - if (message.conversationType == CNLive_ConversationType_CHATROOM && [message.targetId isEqualToString:@"60_7788"]) { 176 + if (message.conversationType == CNLive_ConversationType_CHATROOM && [message.targetId isEqualToString:@"7788"]) {
177 177
178 MessageModel *model = [[MessageModel alloc] init]; 178 MessageModel *model = [[MessageModel alloc] init];
179 179
CNLiveChatSDKDemo/CNLiveChatSDKDemo/PrivateViewController.m
@@ -119,7 +119,7 @@ static NSString *priCellId = @&quot;priCellId&quot;; @@ -119,7 +119,7 @@ static NSString *priCellId = @&quot;priCellId&quot;;
119 119
120 [[CNLiveChatManager sharedCNLiveChatManager] sendMessage:textField.text type:CNLive_ConversationType_PRIVATE targetId:@"20170311" success:^(CNLiveChatMessage *message) { 120 [[CNLiveChatManager sharedCNLiveChatManager] sendMessage:textField.text type:CNLive_ConversationType_PRIVATE targetId:@"20170311" success:^(CNLiveChatMessage *message) {
121 121
122 - NSLog(@"发送消息成功:%@",message); 122 + NSLog(@"发送消息成功:%@",message.messageId);
123 // 自己发送的消息不会被onReceived:方法实时监听,需要自己做处理 123 // 自己发送的消息不会被onReceived:方法实时监听,需要自己做处理
124 MessageModel *model = [[MessageModel alloc] init]; 124 MessageModel *model = [[MessageModel alloc] init];
125 125
CNLiveChatSDKDemo/CNLiveMsgTools.framework/CNLiveMsgTools
No preview for this file type
CNLiveChatSDKDemo/CNLiveMsgTools.framework/Headers/CNLiveMsgManager.h
@@ -71,7 +71,7 @@ @@ -71,7 +71,7 @@
71 - (void)sendCarrier:(NSString *)carrier 71 - (void)sendCarrier:(NSString *)carrier
72 type:(NSInteger)type 72 type:(NSInteger)type
73 targetId:(NSString *)targetId 73 targetId:(NSString *)targetId
74 - success:(void (^)(NSString *carrier, NSString *messageId, NSString *targetId, NSInteger type, NSString *infoId, NSString *infoName, NSString *infoUrl))successBlock 74 + success:(void (^)(NSString *carrier, NSString *messageId, NSString *targetId, NSInteger type, NSString *infoId, NSString *infoName, NSString *infoUrl, long long goTime, long long comeTime))successBlock
75 error:(void (^)(NSInteger errors, NSString *messageId, NSString *targetId))errorBlock; 75 error:(void (^)(NSInteger errors, NSString *messageId, NSString *targetId))errorBlock;
76 76
77 77
CNLiveChatSDKDemo/CNLiveMsgTools.framework/Info.plist
No preview for this file type