Commit 55c6082f1e76f07ddc831ee06b5ef2202b30069f
1 parent
2cb3b5ea
更换SDK
Showing
4 changed files
with
14 additions
and
6 deletions
CNLiveChatSDKDemo/CNLiveChatManager.framework/CNLiveChatManager
No preview for this file type
CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveChatManager.h
| ... | ... | @@ -211,6 +211,9 @@ |
| 211 | 211 | @param count 所要获取的消息数量 |
| 212 | 212 | |
| 213 | 213 | @return 消息数组(CNLiveChatMessage类型) |
| 214 | + @discussion | |
| 215 | + 此方法会获取该会话中指定数量的最新消息实体,返回的消息实体按照时间从新到旧排列。 | |
| 216 | + 如果会话中的消息数量小于参数count的值,会将该会话中的所有消息返回。 | |
| 214 | 217 | */ |
| 215 | 218 | - (NSArray *)getLatestMessages:(CNLiveConversationType)conversationType |
| 216 | 219 | targetId:(NSString *)targetId | ... | ... |
CNLiveChatSDKDemo/CNLiveChatSDKDemo.xcodeproj/project.pbxproj
| ... | ... | @@ -11,8 +11,9 @@ |
| 11 | 11 | D22551F61E7943740056B231 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D22551F51E7943740056B231 /* CNLiveChatManager.framework */; }; |
| 12 | 12 | D22551F71E79437C0056B231 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D22551F31E79436D0056B231 /* CNLiveMsgTools.framework */; }; |
| 13 | 13 | D22551F81E79437C0056B231 /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D22551F31E79436D0056B231 /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; |
| 14 | - D22551F91E79437F0056B231 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D22551F51E7943740056B231 /* CNLiveChatManager.framework */; }; | |
| 15 | - D22551FA1E79437F0056B231 /* CNLiveChatManager.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D22551F51E7943740056B231 /* CNLiveChatManager.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | |
| 14 | + D225520B1E794A270056B231 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D225520A1E794A270056B231 /* CNLiveChatManager.framework */; }; | |
| 15 | + D225520C1E794A2C0056B231 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D225520A1E794A270056B231 /* CNLiveChatManager.framework */; }; | |
| 16 | + D225520D1E794A2C0056B231 /* CNLiveChatManager.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D225520A1E794A270056B231 /* CNLiveChatManager.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | |
| 16 | 17 | D231941F1E70101500111C3B /* MessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D231941E1E70101500111C3B /* MessageModel.m */; }; |
| 17 | 18 | D231C8A61E6FFC2700EAC427 /* ChatRoomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D231C8A51E6FFC2700EAC427 /* ChatRoomViewController.m */; }; |
| 18 | 19 | D231C8A91E6FFD3100EAC427 /* PrivateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D231C8A81E6FFD3100EAC427 /* PrivateViewController.m */; }; |
| ... | ... | @@ -32,7 +33,7 @@ |
| 32 | 33 | dstSubfolderSpec = 10; |
| 33 | 34 | files = ( |
| 34 | 35 | D22551F81E79437C0056B231 /* CNLiveMsgTools.framework in Embed Frameworks */, |
| 35 | - D22551FA1E79437F0056B231 /* CNLiveChatManager.framework in Embed Frameworks */, | |
| 36 | + D225520D1E794A2C0056B231 /* CNLiveChatManager.framework in Embed Frameworks */, | |
| 36 | 37 | ); |
| 37 | 38 | name = "Embed Frameworks"; |
| 38 | 39 | runOnlyForDeploymentPostprocessing = 0; |
| ... | ... | @@ -41,7 +42,8 @@ |
| 41 | 42 | |
| 42 | 43 | /* Begin PBXFileReference section */ |
| 43 | 44 | D22551F31E79436D0056B231 /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; }; |
| 44 | - D22551F51E7943740056B231 /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; }; | |
| 45 | + D22551F51E7943740056B231 /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CNLiveChatManager.framework; path = /Users/cnlive/Desktop/CNLiveChatManagerSDKDemo/CNLiveChatSDKDemo/CNLiveChatManager.framework; sourceTree = "<absolute>"; }; | |
| 46 | + D225520A1E794A270056B231 /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; }; | |
| 45 | 47 | D231941D1E70101500111C3B /* MessageModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageModel.h; sourceTree = "<group>"; }; |
| 46 | 48 | D231941E1E70101500111C3B /* MessageModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageModel.m; sourceTree = "<group>"; }; |
| 47 | 49 | D231C8A41E6FFC2700EAC427 /* ChatRoomViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatRoomViewController.h; sourceTree = "<group>"; }; |
| ... | ... | @@ -68,8 +70,9 @@ |
| 68 | 70 | files = ( |
| 69 | 71 | D22551F41E79436D0056B231 /* CNLiveMsgTools.framework in Frameworks */, |
| 70 | 72 | D22551F61E7943740056B231 /* CNLiveChatManager.framework in Frameworks */, |
| 73 | + D225520C1E794A2C0056B231 /* CNLiveChatManager.framework in Frameworks */, | |
| 71 | 74 | D22551F71E79437C0056B231 /* CNLiveMsgTools.framework in Frameworks */, |
| 72 | - D22551F91E79437F0056B231 /* CNLiveChatManager.framework in Frameworks */, | |
| 75 | + D225520B1E794A270056B231 /* CNLiveChatManager.framework in Frameworks */, | |
| 73 | 76 | ); |
| 74 | 77 | runOnlyForDeploymentPostprocessing = 0; |
| 75 | 78 | }; |
| ... | ... | @@ -101,7 +104,7 @@ |
| 101 | 104 | D264D5971E6FDE02002CDF41 = { |
| 102 | 105 | isa = PBXGroup; |
| 103 | 106 | children = ( |
| 104 | - D22551F51E7943740056B231 /* CNLiveChatManager.framework */, | |
| 107 | + D225520A1E794A270056B231 /* CNLiveChatManager.framework */, | |
| 105 | 108 | D22551F31E79436D0056B231 /* CNLiveMsgTools.framework */, |
| 106 | 109 | D264D5A21E6FDE02002CDF41 /* CNLiveChatSDKDemo */, |
| 107 | 110 | D264D5A11E6FDE02002CDF41 /* Products */, | ... | ... |
CNLiveChatSDKDemo/CNLiveChatSDKDemo/PrivateViewController.m
| ... | ... | @@ -43,6 +43,7 @@ static NSString *priCellId = @"priCellId"; |
| 43 | 43 | |
| 44 | 44 | _messageArrayM = [[NSMutableArray alloc] init]; |
| 45 | 45 | |
| 46 | + // 获取最新消息 | |
| 46 | 47 | [self getPrivateChattingRecords]; |
| 47 | 48 | } |
| 48 | 49 | |
| ... | ... | @@ -199,6 +200,7 @@ static NSString *priCellId = @"priCellId"; |
| 199 | 200 | #pragma mark - 获取私聊最新历史聊天记录 !!!!!!!!!!!!!!!!!!!!!!!! |
| 200 | 201 | - (void)getPrivateChattingRecords { |
| 201 | 202 | |
| 203 | + // 获取最新消息 | |
| 202 | 204 | NSArray *messageArray = [[CNLiveChatManager sharedCNLiveChatManager] getLatestMessages:CNLive_ConversationType_PRIVATE targetId:@"20170311" count:10]; |
| 203 | 205 | |
| 204 | 206 | for (CNLiveChatMessage *message in messageArray) { | ... | ... |