Commit 258bb9fe6ed532ad2bd07050897ff6f05df25dce
1 parent
5a3b3a87
更新CNLiveMsgTools工具类
Showing
5 changed files
with
46 additions
and
8 deletions
CNLivePlayerSDKTest/CNLivePlayerSDKTest.xcodeproj/project.pbxproj
| ... | ... | @@ -14,14 +14,15 @@ |
| 14 | 14 | 32E6CA391D5B0AF400B58EBC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32E6CA371D5B0AF400B58EBC /* LaunchScreen.storyboard */; }; |
| 15 | 15 | 32E6CA901D5B2AF700B58EBC /* BarrageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32E6CA831D5B2AF700B58EBC /* BarrageViewController.m */; }; |
| 16 | 16 | 32E6CA931D5B2AF700B58EBC /* PlayerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32E6CA8A1D5B2AF700B58EBC /* PlayerViewController.m */; }; |
| 17 | + 812245E01F21F63A008C2B64 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 812245DF1F21F63A008C2B64 /* CNLiveMsgTools.framework */; }; | |
| 18 | + 812245E11F21F649008C2B64 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 812245DF1F21F63A008C2B64 /* CNLiveMsgTools.framework */; }; | |
| 19 | + 812245E21F21F649008C2B64 /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 812245DF1F21F63A008C2B64 /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | |
| 17 | 20 | 8133FA351E71428800FBFE95 /* BackgroundView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8133FA341E71428800FBFE95 /* BackgroundView.m */; }; |
| 18 | 21 | 8133FA391E71454C00FBFE95 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8133FA381E71454C00FBFE95 /* Assets.xcassets */; }; |
| 19 | 22 | 8156819A1ED7DEB300635393 /* LoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 815681991ED7DEB300635393 /* LoadingView.m */; }; |
| 20 | 23 | 8156819E1ED7DEE100635393 /* CNLiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8156819D1ED7DEE100635393 /* CNLiveViewController.m */; }; |
| 21 | - 816D7B161F0E158F007C1436 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 816D7B141F0E158F007C1436 /* CNLiveMsgTools.framework */; }; | |
| 22 | 24 | 816D7B1C1F0E15DE007C1436 /* GPUImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 816D7B1A1F0E15DE007C1436 /* GPUImage.framework */; }; |
| 23 | 25 | 816D7B1D1F0E15DE007C1436 /* libksygpulive.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 816D7B1B1F0E15DE007C1436 /* libksygpulive.framework */; }; |
| 24 | - 816D7B211F0E15FC007C1436 /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 816D7B141F0E158F007C1436 /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | |
| 25 | 26 | 816D7B231F0E15FC007C1436 /* GPUImage.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 816D7B1A1F0E15DE007C1436 /* GPUImage.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; |
| 26 | 27 | 816D7B251F0E15FC007C1436 /* libksygpulive.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 816D7B1B1F0E15DE007C1436 /* libksygpulive.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; |
| 27 | 28 | 819135E81EDFB4EE00C28F12 /* AudioStreamingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 819135E31EDFB4EE00C28F12 /* AudioStreamingViewController.m */; }; |
| ... | ... | @@ -49,8 +50,8 @@ |
| 49 | 50 | dstSubfolderSpec = 10; |
| 50 | 51 | files = ( |
| 51 | 52 | 816D7B251F0E15FC007C1436 /* libksygpulive.framework in Embed Frameworks */, |
| 53 | + 812245E21F21F649008C2B64 /* CNLiveMsgTools.framework in Embed Frameworks */, | |
| 52 | 54 | 819EEC091F1F57BC004F8CDF /* CNLivePlayerSDK.framework in Embed Frameworks */, |
| 53 | - 816D7B211F0E15FC007C1436 /* CNLiveMsgTools.framework in Embed Frameworks */, | |
| 54 | 55 | 816D7B231F0E15FC007C1436 /* GPUImage.framework in Embed Frameworks */, |
| 55 | 56 | ); |
| 56 | 57 | name = "Embed Frameworks"; |
| ... | ... | @@ -73,13 +74,13 @@ |
| 73 | 74 | 32E6CA831D5B2AF700B58EBC /* BarrageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BarrageViewController.m; sourceTree = "<group>"; }; |
| 74 | 75 | 32E6CA891D5B2AF700B58EBC /* PlayerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlayerViewController.h; sourceTree = "<group>"; }; |
| 75 | 76 | 32E6CA8A1D5B2AF700B58EBC /* PlayerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlayerViewController.m; sourceTree = "<group>"; }; |
| 77 | + 812245DF1F21F63A008C2B64 /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; }; | |
| 76 | 78 | 8133FA331E71428800FBFE95 /* BackgroundView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackgroundView.h; sourceTree = "<group>"; }; |
| 77 | 79 | 8133FA341E71428800FBFE95 /* BackgroundView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BackgroundView.m; sourceTree = "<group>"; }; |
| 78 | 80 | 8133FA381E71454C00FBFE95 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; |
| 79 | 81 | 815681981ED7DEB300635393 /* LoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoadingView.h; sourceTree = "<group>"; }; |
| 80 | 82 | 815681991ED7DEB300635393 /* LoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoadingView.m; sourceTree = "<group>"; }; |
| 81 | 83 | 8156819D1ED7DEE100635393 /* CNLiveViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveViewController.m; sourceTree = "<group>"; }; |
| 82 | - 816D7B141F0E158F007C1436 /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; }; | |
| 83 | 84 | 816D7B1A1F0E15DE007C1436 /* GPUImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GPUImage.framework; sourceTree = "<group>"; }; |
| 84 | 85 | 816D7B1B1F0E15DE007C1436 /* libksygpulive.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = libksygpulive.framework; sourceTree = "<group>"; }; |
| 85 | 86 | 819135E21EDFB4EE00C28F12 /* AudioStreamingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioStreamingViewController.h; sourceTree = "<group>"; }; |
| ... | ... | @@ -109,11 +110,12 @@ |
| 109 | 110 | isa = PBXFrameworksBuildPhase; |
| 110 | 111 | buildActionMask = 2147483647; |
| 111 | 112 | files = ( |
| 112 | - 816D7B161F0E158F007C1436 /* CNLiveMsgTools.framework in Frameworks */, | |
| 113 | 113 | 819EEC071F1F5676004F8CDF /* CNLivePlayerSDK.framework in Frameworks */, |
| 114 | + 812245E01F21F63A008C2B64 /* CNLiveMsgTools.framework in Frameworks */, | |
| 114 | 115 | 816D7B1D1F0E15DE007C1436 /* libksygpulive.framework in Frameworks */, |
| 115 | 116 | 816D7B1C1F0E15DE007C1436 /* GPUImage.framework in Frameworks */, |
| 116 | 117 | 819EEC081F1F57BC004F8CDF /* CNLivePlayerSDK.framework in Frameworks */, |
| 118 | + 812245E11F21F649008C2B64 /* CNLiveMsgTools.framework in Frameworks */, | |
| 117 | 119 | ); |
| 118 | 120 | runOnlyForDeploymentPostprocessing = 0; |
| 119 | 121 | }; |
| ... | ... | @@ -213,9 +215,9 @@ |
| 213 | 215 | 816D7B131F0E158F007C1436 /* CNLiveSDKs */ = { |
| 214 | 216 | isa = PBXGroup; |
| 215 | 217 | children = ( |
| 218 | + 812245DF1F21F63A008C2B64 /* CNLiveMsgTools.framework */, | |
| 216 | 219 | 819EEC0A1F1F58DA004F8CDF /* KSYGPUResource.bundle */, |
| 217 | 220 | 819EEC061F1F5676004F8CDF /* CNLivePlayerSDK.framework */, |
| 218 | - 816D7B141F0E158F007C1436 /* CNLiveMsgTools.framework */, | |
| 219 | 221 | 816D7B1A1F0E15DE007C1436 /* GPUImage.framework */, |
| 220 | 222 | 816D7B1B1F0E15DE007C1436 /* libksygpulive.framework */, |
| 221 | 223 | ); |
| ... | ... | @@ -443,6 +445,7 @@ |
| 443 | 445 | "$(PROJECT_DIR)/CNLivePlayerSDKTest", |
| 444 | 446 | "$(PROJECT_DIR)", |
| 445 | 447 | "$(PROJECT_DIR)/CNLiveSDKs", |
| 448 | + "$(PROJECT_DIR)/CNLiveSDKs/KSYGPUResource.bundle", | |
| 446 | 449 | ); |
| 447 | 450 | INFOPLIST_FILE = CNLivePlayerSDKTest/Info.plist; |
| 448 | 451 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; |
| ... | ... | @@ -464,6 +467,7 @@ |
| 464 | 467 | "$(PROJECT_DIR)/CNLivePlayerSDKTest", |
| 465 | 468 | "$(PROJECT_DIR)", |
| 466 | 469 | "$(PROJECT_DIR)/CNLiveSDKs", |
| 470 | + "$(PROJECT_DIR)/CNLiveSDKs/KSYGPUResource.bundle", | |
| 467 | 471 | ); |
| 468 | 472 | INFOPLIST_FILE = CNLivePlayerSDKTest/Info.plist; |
| 469 | 473 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; | ... | ... |
CNLivePlayerSDKTest/CNLiveSDKs/CNLiveMsgTools.framework/CNLiveMsgTools
No preview for this file type
CNLivePlayerSDKTest/CNLiveSDKs/CNLiveMsgTools.framework/Headers/CNLiveMsgManager.h
| ... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 | |
| 13 | 13 | @property (nonatomic, readonly, assign) BOOL isTestEnvironment; |
| 14 | 14 | |
| 15 | + | |
| 15 | 16 | + (NSString *)getCNLiveMsgVersion; |
| 16 | 17 | |
| 17 | 18 | |
| ... | ... | @@ -25,6 +26,12 @@ |
| 25 | 26 | - (NSDictionary *)getToolsInfo; |
| 26 | 27 | |
| 27 | 28 | |
| 29 | +- (NSDictionary *)messageWithImage:(id)image; | |
| 30 | + | |
| 31 | + | |
| 32 | +- (NSDictionary *)messageWithVoice:(NSData *)voiceData duration:(long)duration; | |
| 33 | + | |
| 34 | + | |
| 28 | 35 | - (void)initCNLiveMsgToolsWithAppKey:(NSString *)appKey appId:(NSString *)appId; |
| 29 | 36 | |
| 30 | 37 | |
| ... | ... | @@ -72,13 +79,23 @@ |
| 72 | 79 | error:(void (^)(NSInteger errors, NSString *targetId))errorBlock; |
| 73 | 80 | |
| 74 | 81 | |
| 75 | -- (void)sendCarrier:(NSString *)carrier | |
| 82 | +- (void)sendCarrier:(NSDictionary *)carrier | |
| 76 | 83 | type:(NSInteger)type |
| 77 | 84 | targetId:(NSString *)targetId |
| 78 | 85 | success:(void (^)(NSString *carrier, NSString *messageId, NSString *targetId, NSInteger type, NSString *infoId, NSString *infoName, NSString *infoUrl, long long goTime, long long comeTime))successBlock |
| 79 | 86 | error:(void (^)(NSInteger errors, NSString *messageId, NSString *targetId))errorBlock; |
| 80 | 87 | |
| 81 | 88 | |
| 89 | +- (void)sendMedia:(NSDictionary *)media type:(NSInteger)type | |
| 90 | + targetId:(NSString *)targetId | |
| 91 | + pushContent:(NSString *)pushContent | |
| 92 | + pushData:(NSString *)pushData | |
| 93 | + progress:(void (^)(int progress, NSString *messageId))progressBlock | |
| 94 | + success:(void (^)(NSString *messageId, NSString *targetId, NSInteger type, NSString *infoId, NSString *infoName, NSString *infoUrl))successBlock | |
| 95 | + error:(void (^)(NSInteger errorCode, NSString *messageId))errorBlock | |
| 96 | + cancel:(void (^)(NSString * messageId))cancelBlock; | |
| 97 | + | |
| 98 | + | |
| 82 | 99 | - (NSInteger)getOnLineStatus; |
| 83 | 100 | |
| 84 | 101 | ... | ... |
发布版SDK/CNLiveMsgTools.framework/CNLiveMsgTools
No preview for this file type
发布版SDK/CNLiveMsgTools.framework/Headers/CNLiveMsgManager.h
| ... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 | |
| 13 | 13 | @property (nonatomic, readonly, assign) BOOL isTestEnvironment; |
| 14 | 14 | |
| 15 | + | |
| 15 | 16 | + (NSString *)getCNLiveMsgVersion; |
| 16 | 17 | |
| 17 | 18 | |
| ... | ... | @@ -25,6 +26,12 @@ |
| 25 | 26 | - (NSDictionary *)getToolsInfo; |
| 26 | 27 | |
| 27 | 28 | |
| 29 | +- (NSDictionary *)messageWithImage:(id)image; | |
| 30 | + | |
| 31 | + | |
| 32 | +- (NSDictionary *)messageWithVoice:(NSData *)voiceData duration:(long)duration; | |
| 33 | + | |
| 34 | + | |
| 28 | 35 | - (void)initCNLiveMsgToolsWithAppKey:(NSString *)appKey appId:(NSString *)appId; |
| 29 | 36 | |
| 30 | 37 | |
| ... | ... | @@ -72,13 +79,23 @@ |
| 72 | 79 | error:(void (^)(NSInteger errors, NSString *targetId))errorBlock; |
| 73 | 80 | |
| 74 | 81 | |
| 75 | -- (void)sendCarrier:(NSString *)carrier | |
| 82 | +- (void)sendCarrier:(NSDictionary *)carrier | |
| 76 | 83 | type:(NSInteger)type |
| 77 | 84 | targetId:(NSString *)targetId |
| 78 | 85 | success:(void (^)(NSString *carrier, NSString *messageId, NSString *targetId, NSInteger type, NSString *infoId, NSString *infoName, NSString *infoUrl, long long goTime, long long comeTime))successBlock |
| 79 | 86 | error:(void (^)(NSInteger errors, NSString *messageId, NSString *targetId))errorBlock; |
| 80 | 87 | |
| 81 | 88 | |
| 89 | +- (void)sendMedia:(NSDictionary *)media type:(NSInteger)type | |
| 90 | + targetId:(NSString *)targetId | |
| 91 | + pushContent:(NSString *)pushContent | |
| 92 | + pushData:(NSString *)pushData | |
| 93 | + progress:(void (^)(int progress, NSString *messageId))progressBlock | |
| 94 | + success:(void (^)(NSString *messageId, NSString *targetId, NSInteger type, NSString *infoId, NSString *infoName, NSString *infoUrl))successBlock | |
| 95 | + error:(void (^)(NSInteger errorCode, NSString *messageId))errorBlock | |
| 96 | + cancel:(void (^)(NSString * messageId))cancelBlock; | |
| 97 | + | |
| 98 | + | |
| 82 | 99 | - (NSInteger)getOnLineStatus; |
| 83 | 100 | |
| 84 | 101 | ... | ... |