Commit b14c0be32a15616e3a5ae956134d15aa095a424f

Authored by 王军波
1 parent 5843a047

hh

Showing 30 changed files with 138 additions and 25 deletions
CNLiveChatSDKDemo/CNLiveChatManager.framework/CNLiveChatManager 0 → 100755
No preview for this file type
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveChatManager.h renamed to CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveChatManager.h
@@ -57,6 +57,12 @@ @@ -57,6 +57,12 @@
57 57
58 @interface CNLiveChatManager : NSObject 58 @interface CNLiveChatManager : NSObject
59 59
  60 +
  61 +/**
  62 + 是否是测试环境
  63 + */
  64 +@property (nonatomic, readonly, assign) BOOL isTestEnvironment;
  65 +
60 /** 66 /**
61 聊天SDK代理,设置代理后,实现代理方法。 67 聊天SDK代理,设置代理后,实现代理方法。
62 */ 68 */
@@ -101,6 +107,19 @@ @@ -101,6 +107,19 @@
101 107
102 108
103 /** 109 /**
  110 + 初始化SDK方法
  111 +
  112 + @param appKey 从视讯云平台获取到的appKey
  113 + @param appId 从视讯云平台获取到的appId
  114 + @param isTestEnvironment 是否是测试环境
  115 + @warning 必传参数
  116 + @discussion 您在使用聊天SDK所有功能之前,您必须先调用此方法初始化SDK。
  117 + 在App整个生命周期中,您只需要执行一次初始化。
  118 + */
  119 +- (void)initWithAppKey:(NSString *)appKey appId:(NSString *)appId isTestEnvironment:(BOOL)isTestEnvironment;
  120 +
  121 +
  122 +/**
104 连接到视讯云服务器 123 连接到视讯云服务器
105 124
106 @param successBlock 连接建立成功的回调。 125 @param successBlock 连接建立成功的回调。
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveChatMessage.h renamed to CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveChatMessage.h
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveChatStatusDefine.h renamed to CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveChatStatusDefine.h
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveChatUserInfo.h renamed to CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveChatUserInfo.h
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveCommentCountResult.h renamed to CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveCommentCountResult.h
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveCommentDetailInfoResult.h renamed to CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveCommentDetailInfoResult.h
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveCommentListResult.h renamed to CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveCommentListResult.h
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveCommentManager.h renamed to CNLiveChatSDKDemo/CNLiveChatManager.framework/Headers/CNLiveCommentManager.h
@@ -13,6 +13,11 @@ @@ -13,6 +13,11 @@
13 @interface CNLiveCommentManager : NSObject 13 @interface CNLiveCommentManager : NSObject
14 14
15 /** 15 /**
  16 + 是否是测试环境
  17 + */
  18 +@property (nonatomic, readonly, assign) BOOL isTestEnvironment;
  19 +
  20 +/**
16 获取SDK版本号 21 获取SDK版本号
17 22
18 @return SDK版本号 23 @return SDK版本号
@@ -40,6 +45,15 @@ @@ -40,6 +45,15 @@
40 45
41 46
42 /** 47 /**
  48 + 注册视讯评论
  49 +
  50 + @param appId 从视讯云平台获取到的appId
  51 + @param appKey 从视讯云平台获取到的appKey
  52 + @param isTestEnvironment 是否是测试环境,YES是测试环境,NO是上线环境
  53 + */
  54 +- (void)registerWithAppId:(NSString *)appId appKey:(NSString *)appKey isTestEnvironment:(BOOL)isTestEnvironment;
  55 +
  56 +/**
43 获取评论列表 57 获取评论列表
44 58
45 @param programId 节目ID 59 @param programId 节目ID
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveChatManager.framework/Info.plist renamed to CNLiveChatSDKDemo/CNLiveChatManager.framework/Info.plist
No preview for this file type
CNLiveChatSDKDemo/CNLiveChatSDKDemo.xcodeproj/project.pbxproj
@@ -7,10 +7,12 @@ @@ -7,10 +7,12 @@
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
10 - D20C82B61EEEA34200BB609F /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D20C82B51EEEA34200BB609F /* CNLiveChatManager.framework */; };  
11 - D20C82B81EEEA34500BB609F /* CNLiveChatManager.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D20C82B51EEEA34200BB609F /* CNLiveChatManager.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };  
12 - D20C82BA1EEEA34800BB609F /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D20C82B31EEEA33900BB609F /* CNLiveMsgTools.framework */; };  
13 - D20C82BB1EEEA34800BB609F /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D20C82B31EEEA33900BB609F /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 10 + D214CB431EF7AD490014EEBA /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D214CB421EF7AD490014EEBA /* CNLiveMsgTools.framework */; };
  11 + D214CB451EF7AD4F0014EEBA /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D214CB441EF7AD4F0014EEBA /* CNLiveChatManager.framework */; };
  12 + D214CB461EF7AD560014EEBA /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D214CB421EF7AD490014EEBA /* CNLiveMsgTools.framework */; };
  13 + D214CB471EF7AD560014EEBA /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D214CB421EF7AD490014EEBA /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
  14 + D214CB491EF7AD580014EEBA /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D214CB441EF7AD4F0014EEBA /* CNLiveChatManager.framework */; };
  15 + D214CB4A1EF7AD580014EEBA /* CNLiveChatManager.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D214CB441EF7AD4F0014EEBA /* CNLiveChatManager.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14 D2239CD41EE94F31005572FB /* praiseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D2239CD31EE94F31005572FB /* praiseModel.m */; }; 16 D2239CD41EE94F31005572FB /* praiseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D2239CD31EE94F31005572FB /* praiseModel.m */; };
15 D231941F1E70101500111C3B /* MessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D231941E1E70101500111C3B /* MessageModel.m */; }; 17 D231941F1E70101500111C3B /* MessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D231941E1E70101500111C3B /* MessageModel.m */; };
16 D231C8A61E6FFC2700EAC427 /* ChatRoomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D231C8A51E6FFC2700EAC427 /* ChatRoomViewController.m */; }; 18 D231C8A61E6FFC2700EAC427 /* ChatRoomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D231C8A51E6FFC2700EAC427 /* ChatRoomViewController.m */; };
@@ -26,14 +28,14 @@ @@ -26,14 +28,14 @@
26 /* End PBXBuildFile section */ 28 /* End PBXBuildFile section */
27 29
28 /* Begin PBXCopyFilesBuildPhase section */ 30 /* Begin PBXCopyFilesBuildPhase section */
29 - D20C82B91EEEA34500BB609F /* Embed Frameworks */ = { 31 + D214CB481EF7AD560014EEBA /* Embed Frameworks */ = {
30 isa = PBXCopyFilesBuildPhase; 32 isa = PBXCopyFilesBuildPhase;
31 buildActionMask = 2147483647; 33 buildActionMask = 2147483647;
32 dstPath = ""; 34 dstPath = "";
33 dstSubfolderSpec = 10; 35 dstSubfolderSpec = 10;
34 files = ( 36 files = (
35 - D20C82B81EEEA34500BB609F /* CNLiveChatManager.framework in Embed Frameworks */,  
36 - D20C82BB1EEEA34800BB609F /* CNLiveMsgTools.framework in Embed Frameworks */, 37 + D214CB471EF7AD560014EEBA /* CNLiveMsgTools.framework in Embed Frameworks */,
  38 + D214CB4A1EF7AD580014EEBA /* CNLiveChatManager.framework in Embed Frameworks */,
37 ); 39 );
38 name = "Embed Frameworks"; 40 name = "Embed Frameworks";
39 runOnlyForDeploymentPostprocessing = 0; 41 runOnlyForDeploymentPostprocessing = 0;
@@ -41,8 +43,8 @@ @@ -41,8 +43,8 @@
41 /* End PBXCopyFilesBuildPhase section */ 43 /* End PBXCopyFilesBuildPhase section */
42 44
43 /* Begin PBXFileReference section */ 45 /* Begin PBXFileReference section */
44 - D20C82B31EEEA33900BB609F /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; };  
45 - D20C82B51EEEA34200BB609F /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; }; 46 + D214CB421EF7AD490014EEBA /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; };
  47 + D214CB441EF7AD4F0014EEBA /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; };
46 D2239CD21EE94F31005572FB /* praiseModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = praiseModel.h; sourceTree = "<group>"; }; 48 D2239CD21EE94F31005572FB /* praiseModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = praiseModel.h; sourceTree = "<group>"; };
47 D2239CD31EE94F31005572FB /* praiseModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = praiseModel.m; sourceTree = "<group>"; }; 49 D2239CD31EE94F31005572FB /* praiseModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = praiseModel.m; sourceTree = "<group>"; };
48 D231941D1E70101500111C3B /* MessageModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageModel.h; sourceTree = "<group>"; }; 50 D231941D1E70101500111C3B /* MessageModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageModel.h; sourceTree = "<group>"; };
@@ -73,8 +75,10 @@ @@ -73,8 +75,10 @@
73 isa = PBXFrameworksBuildPhase; 75 isa = PBXFrameworksBuildPhase;
74 buildActionMask = 2147483647; 76 buildActionMask = 2147483647;
75 files = ( 77 files = (
76 - D20C82BA1EEEA34800BB609F /* CNLiveMsgTools.framework in Frameworks */,  
77 - D20C82B61EEEA34200BB609F /* CNLiveChatManager.framework in Frameworks */, 78 + D214CB431EF7AD490014EEBA /* CNLiveMsgTools.framework in Frameworks */,
  79 + D214CB451EF7AD4F0014EEBA /* CNLiveChatManager.framework in Frameworks */,
  80 + D214CB461EF7AD560014EEBA /* CNLiveMsgTools.framework in Frameworks */,
  81 + D214CB491EF7AD580014EEBA /* CNLiveChatManager.framework in Frameworks */,
78 ); 82 );
79 runOnlyForDeploymentPostprocessing = 0; 83 runOnlyForDeploymentPostprocessing = 0;
80 }; 84 };
@@ -119,6 +123,8 @@ @@ -119,6 +123,8 @@
119 D264D5971E6FDE02002CDF41 = { 123 D264D5971E6FDE02002CDF41 = {
120 isa = PBXGroup; 124 isa = PBXGroup;
121 children = ( 125 children = (
  126 + D214CB441EF7AD4F0014EEBA /* CNLiveChatManager.framework */,
  127 + D214CB421EF7AD490014EEBA /* CNLiveMsgTools.framework */,
122 D264D5A21E6FDE02002CDF41 /* CNLiveChatSDKDemo */, 128 D264D5A21E6FDE02002CDF41 /* CNLiveChatSDKDemo */,
123 D264D5A11E6FDE02002CDF41 /* Products */, 129 D264D5A11E6FDE02002CDF41 /* Products */,
124 ); 130 );
@@ -135,8 +141,6 @@ @@ -135,8 +141,6 @@
135 D264D5A21E6FDE02002CDF41 /* CNLiveChatSDKDemo */ = { 141 D264D5A21E6FDE02002CDF41 /* CNLiveChatSDKDemo */ = {
136 isa = PBXGroup; 142 isa = PBXGroup;
137 children = ( 143 children = (
138 - D20C82B51EEEA34200BB609F /* CNLiveChatManager.framework */,  
139 - D20C82B31EEEA33900BB609F /* CNLiveMsgTools.framework */,  
140 D264D5A61E6FDE02002CDF41 /* AppDelegate.h */, 144 D264D5A61E6FDE02002CDF41 /* AppDelegate.h */,
141 D264D5A71E6FDE02002CDF41 /* AppDelegate.m */, 145 D264D5A71E6FDE02002CDF41 /* AppDelegate.m */,
142 D23194201E70101B00111C3B /* Model */, 146 D23194201E70101B00111C3B /* Model */,
@@ -170,7 +174,7 @@ @@ -170,7 +174,7 @@
170 D264D59C1E6FDE02002CDF41 /* Sources */, 174 D264D59C1E6FDE02002CDF41 /* Sources */,
171 D264D59D1E6FDE02002CDF41 /* Frameworks */, 175 D264D59D1E6FDE02002CDF41 /* Frameworks */,
172 D264D59E1E6FDE02002CDF41 /* Resources */, 176 D264D59E1E6FDE02002CDF41 /* Resources */,
173 - D20C82B91EEEA34500BB609F /* Embed Frameworks */, 177 + D214CB481EF7AD560014EEBA /* Embed Frameworks */,
174 ); 178 );
175 buildRules = ( 179 buildRules = (
176 ); 180 );
CNLiveChatSDKDemo/CNLiveChatSDKDemo.xcodeproj/xcuserdata/cnlive.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -2,4 +2,38 @@ @@ -2,4 +2,38 @@
2 <Bucket 2 <Bucket
3 type = "1" 3 type = "1"
4 version = "2.0"> 4 version = "2.0">
  5 + <Breakpoints>
  6 + <BreakpointProxy
  7 + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
  8 + <BreakpointContent
  9 + shouldBeEnabled = "Yes"
  10 + ignoreCount = "0"
  11 + continueAfterRunningActions = "No"
  12 + filePath = "CNLiveChatSDKDemo/CommentViewController.m"
  13 + timestampString = "520502037.120796"
  14 + startingColumnNumber = "9223372036854775807"
  15 + endingColumnNumber = "9223372036854775807"
  16 + startingLineNumber = "125"
  17 + endingLineNumber = "125"
  18 + landmarkName = "-textFieldShouldReturn:"
  19 + landmarkType = "7">
  20 + </BreakpointContent>
  21 + </BreakpointProxy>
  22 + <BreakpointProxy
  23 + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
  24 + <BreakpointContent
  25 + shouldBeEnabled = "Yes"
  26 + ignoreCount = "0"
  27 + continueAfterRunningActions = "No"
  28 + filePath = "CNLiveChatSDKDemo/CommentViewController.m"
  29 + timestampString = "520502037.120796"
  30 + startingColumnNumber = "9223372036854775807"
  31 + endingColumnNumber = "9223372036854775807"
  32 + startingLineNumber = "131"
  33 + endingLineNumber = "131"
  34 + landmarkName = "-textFieldShouldReturn:"
  35 + landmarkType = "7">
  36 + </BreakpointContent>
  37 + </BreakpointProxy>
  38 + </Breakpoints>
5 </Bucket> 39 </Bucket>
CNLiveChatSDKDemo/CNLiveChatSDKDemo/AppDelegate.m
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
38 // 除非您已经手动将连接断开,或者杀死程序,或者少数无法自动重连的情况,否则您不需要自己再手动重连。 38 // 除非您已经手动将连接断开,或者杀死程序,或者少数无法自动重连的情况,否则您不需要自己再手动重连。
39 // 客户端使用时可以判断一下当前用户的登录状态,未登录就用上面的 connectServer 的方法连接服务器,已登录就用 loginServer 此方法连接服务器; 39 // 客户端使用时可以判断一下当前用户的登录状态,未登录就用上面的 connectServer 的方法连接服务器,已登录就用 loginServer 此方法连接服务器;
40 40
41 - CNLiveChatUserInfo *userInfo = [[CNLiveChatUserInfo alloc] initWithUserId:@"20170319" name:@"11" portrait:@""]; 41 + CNLiveChatUserInfo *userInfo = [[CNLiveChatUserInfo alloc] initWithUserId:@"20170629" name:@"11" portrait:@""];
42 42
43 [[CNLiveChatManager sharedCNLiveChatManager] loginServer:userInfo success:^(NSString *userId) { 43 [[CNLiveChatManager sharedCNLiveChatManager] loginServer:userInfo success:^(NSString *userId) {
44 44
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveChatManager.framework/CNLiveChatManager deleted 100755 → 0
No preview for this file type
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveCommentTableViewCell.m
@@ -79,7 +79,7 @@ @@ -79,7 +79,7 @@
79 79
80 if ([errorCode isEqualToString:@"0"]) { 80 if ([errorCode isEqualToString:@"0"]) {
81 81
82 - NSLog(@"success"); 82 + NSLog(@"praise success");
83 btn.selected = YES; 83 btn.selected = YES;
84 [btn setUserInteractionEnabled:NO]; 84 [btn setUserInteractionEnabled:NO];
85 _praiseModel.isPraised = YES; 85 _praiseModel.isPraised = YES;
@@ -87,7 +87,7 @@ @@ -87,7 +87,7 @@
87 [_praiseButton setTitle:_model.praise forState:UIControlStateNormal]; 87 [_praiseButton setTitle:_model.praise forState:UIControlStateNormal];
88 88
89 } else { 89 } else {
90 - NSLog(@"failed"); 90 + NSLog(@"praise failed");
91 } 91 }
92 }]; 92 }];
93 } 93 }
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveMsgTools.framework/CNLiveMsgTools deleted 100755 → 0
No preview for this file type
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CommentViewController.m
@@ -32,7 +32,9 @@ static NSString *commentCellId = @&quot;commentCellId&quot;; @@ -32,7 +32,9 @@ static NSString *commentCellId = @&quot;commentCellId&quot;;
32 32
33 self.title = @"评论"; 33 self.title = @"评论";
34 // 注册评论 (*必须*) 34 // 注册评论 (*必须*)
35 - [[CNLiveCommentManager sharedCNLiveCommentManager] registerWithAppId:@"60_irn9cdak77" appKey:@"a425987ebc86e352b3373c25d5bd082d0cc248b4043028"]; 35 +
  36 + // 60_j4fc7dsm83 4c8658abc5d66f270f9bf5dcd1ef11e3597fab4c4e0af9
  37 + [[CNLiveCommentManager sharedCNLiveCommentManager] registerWithAppId:@"60_irn9cdak77" appKey:@"a425987ebc86e352b3373c25d5bd082d0cc248b4043028" isTestEnvironment:YES];
36 38
37 self.view.backgroundColor = [UIColor whiteColor]; 39 self.view.backgroundColor = [UIColor whiteColor];
38 self.automaticallyAdjustsScrollViewInsets = NO; 40 self.automaticallyAdjustsScrollViewInsets = NO;
@@ -56,7 +58,7 @@ static NSString *commentCellId = @&quot;commentCellId&quot;; @@ -56,7 +58,7 @@ static NSString *commentCellId = @&quot;commentCellId&quot;;
56 // 评论列表 58 // 评论列表
57 [[CNLiveCommentManager sharedCNLiveCommentManager] getCommentListWithProgramId:@"123" page:@"1" pageSize:@"10" success:^(CNLiveCommentListResult *result) { 59 [[CNLiveCommentManager sharedCNLiveCommentManager] getCommentListWithProgramId:@"123" page:@"1" pageSize:@"10" success:^(CNLiveCommentListResult *result) {
58 60
59 - NSLog(@"success"); 61 + NSLog(@"getList success");
60 _commentArray = result.comments; 62 _commentArray = result.comments;
61 [_tableView reloadData]; 63 [_tableView reloadData];
62 64
@@ -67,7 +69,7 @@ static NSString *commentCellId = @&quot;commentCellId&quot;; @@ -67,7 +69,7 @@ static NSString *commentCellId = @&quot;commentCellId&quot;;
67 69
68 } error:^(NSString *error) { 70 } error:^(NSString *error) {
69 71
70 - NSLog(@"failed: %@",error); 72 + NSLog(@"getList failed: %@",error);
71 }]; 73 }];
72 } 74 }
73 75
@@ -81,10 +83,10 @@ static NSString *commentCellId = @&quot;commentCellId&quot;; @@ -81,10 +83,10 @@ static NSString *commentCellId = @&quot;commentCellId&quot;;
81 83
82 if ([errorCode isEqualToString:@"0"]) { 84 if ([errorCode isEqualToString:@"0"]) {
83 85
84 - NSLog(@"success"); 86 + NSLog(@"getCount success");
85 _commentCountLabel.text = [NSString stringWithFormat:@"评论数:%@",commentArray[0].count]; 87 _commentCountLabel.text = [NSString stringWithFormat:@"评论数:%@",commentArray[0].count];
86 } else { 88 } else {
87 - NSLog(@"failed"); 89 + NSLog(@"getCount failed");
88 } 90 }
89 }]; 91 }];
90 } 92 }
@@ -120,13 +122,13 @@ static NSString *commentCellId = @&quot;commentCellId&quot;; @@ -120,13 +122,13 @@ static NSString *commentCellId = @&quot;commentCellId&quot;;
120 [[CNLiveCommentManager sharedCNLiveCommentManager] commentOnProgramWithProgramId:@"123" sid:@"888" comment:textField.text completion:^(NSString *errorCode, NSString *errorMsg) { 122 [[CNLiveCommentManager sharedCNLiveCommentManager] commentOnProgramWithProgramId:@"123" sid:@"888" comment:textField.text completion:^(NSString *errorCode, NSString *errorMsg) {
121 123
122 if ([errorCode isEqualToString:@"0"]) { 124 if ([errorCode isEqualToString:@"0"]) {
123 - NSLog(@"success"); 125 + NSLog(@"comment success");
124 126
125 [self getCommentList]; 127 [self getCommentList];
126 [self getCommentCount]; 128 [self getCommentCount];
127 129
128 } else { 130 } else {
129 - NSLog(@"failed"); 131 + NSLog(@"comment failed");
130 } 132 }
131 133
132 }]; 134 }];
@@ -204,5 +206,4 @@ static NSString *commentCellId = @&quot;commentCellId&quot;; @@ -204,5 +206,4 @@ static NSString *commentCellId = @&quot;commentCellId&quot;;
204 // Dispose of any resources that can be recreated. 206 // Dispose of any resources that can be recreated.
205 } 207 }
206 208
207 -  
208 @end 209 @end
CNLiveChatSDKDemo/CNLiveMsgTools.framework/CNLiveMsgTools 0 → 100755
No preview for this file type
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveMsgTools.framework/Emoji.plist renamed to CNLiveChatSDKDemo/CNLiveMsgTools.framework/Emoji.plist
No preview for this file type
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveMsgTools.framework/Headers/CNLiveMsgManager.h renamed to CNLiveChatSDKDemo/CNLiveMsgTools.framework/Headers/CNLiveMsgManager.h
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 10
11 @interface CNLiveMsgManager : NSObject 11 @interface CNLiveMsgManager : NSObject
12 12
  13 +@property (nonatomic, readonly, assign) BOOL isTestEnvironment;
13 14
14 + (NSString *)getCNLiveMsgVersion; 15 + (NSString *)getCNLiveMsgVersion;
15 16
@@ -27,6 +28,9 @@ @@ -27,6 +28,9 @@
27 - (void)initCNLiveMsgToolsWithAppKey:(NSString *)appKey appId:(NSString *)appId; 28 - (void)initCNLiveMsgToolsWithAppKey:(NSString *)appKey appId:(NSString *)appId;
28 29
29 30
  31 +- (void)initCNLiveMsgToolsWithAppKey:(NSString *)appKey appId:(NSString *)appId isTestEnvironment:(BOOL)isTestEnvironment;
  32 +
  33 +
30 - (void)onLineWithMsgToolsInfoId:(NSString *)infoId 34 - (void)onLineWithMsgToolsInfoId:(NSString *)infoId
31 infoName:(NSString *)infoName 35 infoName:(NSString *)infoName
32 infoUrl:(NSString *)infoUrl 36 infoUrl:(NSString *)infoUrl
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveMsgTools.framework/Info.plist renamed to CNLiveChatSDKDemo/CNLiveMsgTools.framework/Info.plist
No preview for this file type
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveMsgTools.framework/RCConfig.plist renamed to CNLiveChatSDKDemo/CNLiveMsgTools.framework/RCConfig.plist
No preview for this file type
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveMsgTools.framework/en.lproj/RongCloudKit.strings renamed to CNLiveChatSDKDemo/CNLiveMsgTools.framework/en.lproj/RongCloudKit.strings
No preview for this file type
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveMsgTools.framework/release_notes_ios.txt renamed to CNLiveChatSDKDemo/CNLiveMsgTools.framework/release_notes_ios.txt
CNLiveChatSDKDemo/CNLiveChatSDKDemo/CNLiveMsgTools.framework/zh-Hans.lproj/RongCloudKit.strings renamed to CNLiveChatSDKDemo/CNLiveMsgTools.framework/zh-Hans.lproj/RongCloudKit.strings
No preview for this file type
发布版SDK/CNLiveChatManager.framework/CNLiveChatManager
No preview for this file type
发布版SDK/CNLiveChatManager.framework/Headers/CNLiveChatManager.h
@@ -57,6 +57,12 @@ @@ -57,6 +57,12 @@
57 57
58 @interface CNLiveChatManager : NSObject 58 @interface CNLiveChatManager : NSObject
59 59
  60 +
  61 +/**
  62 + 是否是测试环境
  63 + */
  64 +@property (nonatomic, readonly, assign) BOOL isTestEnvironment;
  65 +
60 /** 66 /**
61 聊天SDK代理,设置代理后,实现代理方法。 67 聊天SDK代理,设置代理后,实现代理方法。
62 */ 68 */
@@ -101,6 +107,19 @@ @@ -101,6 +107,19 @@
101 107
102 108
103 /** 109 /**
  110 + 初始化SDK方法
  111 +
  112 + @param appKey 从视讯云平台获取到的appKey
  113 + @param appId 从视讯云平台获取到的appId
  114 + @param isTestEnvironment 是否是测试环境
  115 + @warning 必传参数
  116 + @discussion 您在使用聊天SDK所有功能之前,您必须先调用此方法初始化SDK。
  117 + 在App整个生命周期中,您只需要执行一次初始化。
  118 + */
  119 +- (void)initWithAppKey:(NSString *)appKey appId:(NSString *)appId isTestEnvironment:(BOOL)isTestEnvironment;
  120 +
  121 +
  122 +/**
104 连接到视讯云服务器 123 连接到视讯云服务器
105 124
106 @param successBlock 连接建立成功的回调。 125 @param successBlock 连接建立成功的回调。
发布版SDK/CNLiveChatManager.framework/Headers/CNLiveCommentManager.h
@@ -13,6 +13,11 @@ @@ -13,6 +13,11 @@
13 @interface CNLiveCommentManager : NSObject 13 @interface CNLiveCommentManager : NSObject
14 14
15 /** 15 /**
  16 + 是否是测试环境
  17 + */
  18 +@property (nonatomic, readonly, assign) BOOL isTestEnvironment;
  19 +
  20 +/**
16 获取SDK版本号 21 获取SDK版本号
17 22
18 @return SDK版本号 23 @return SDK版本号
@@ -40,6 +45,15 @@ @@ -40,6 +45,15 @@
40 45
41 46
42 /** 47 /**
  48 + 注册视讯评论
  49 +
  50 + @param appId 从视讯云平台获取到的appId
  51 + @param appKey 从视讯云平台获取到的appKey
  52 + @param isTestEnvironment 是否是测试环境,YES是测试环境,NO是上线环境
  53 + */
  54 +- (void)registerWithAppId:(NSString *)appId appKey:(NSString *)appKey isTestEnvironment:(BOOL)isTestEnvironment;
  55 +
  56 +/**
43 获取评论列表 57 获取评论列表
44 58
45 @param programId 节目ID 59 @param programId 节目ID
发布版SDK/CNLiveMsgTools.framework/CNLiveMsgTools
No preview for this file type
发布版SDK/CNLiveMsgTools.framework/Headers/CNLiveMsgManager.h
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 10
11 @interface CNLiveMsgManager : NSObject 11 @interface CNLiveMsgManager : NSObject
12 12
  13 +@property (nonatomic, readonly, assign) BOOL isTestEnvironment;
13 14
14 + (NSString *)getCNLiveMsgVersion; 15 + (NSString *)getCNLiveMsgVersion;
15 16
@@ -27,6 +28,9 @@ @@ -27,6 +28,9 @@
27 - (void)initCNLiveMsgToolsWithAppKey:(NSString *)appKey appId:(NSString *)appId; 28 - (void)initCNLiveMsgToolsWithAppKey:(NSString *)appKey appId:(NSString *)appId;
28 29
29 30
  31 +- (void)initCNLiveMsgToolsWithAppKey:(NSString *)appKey appId:(NSString *)appId isTestEnvironment:(BOOL)isTestEnvironment;
  32 +
  33 +
30 - (void)onLineWithMsgToolsInfoId:(NSString *)infoId 34 - (void)onLineWithMsgToolsInfoId:(NSString *)infoId
31 infoName:(NSString *)infoName 35 infoName:(NSString *)infoName
32 infoUrl:(NSString *)infoUrl 36 infoUrl:(NSString *)infoUrl