... | ... | @@ -205,6 +205,7 @@ PS:其中3.8.0与3.11.2为SDK版本号可自行更改。 |
|
|
解决方案:
|
|
|
Targets -> Build Settings -> 搜索 "Enable Bitcode" 设置为 "NO"
|
|
|
```
|
|
|
|
|
|
2.command + r 运行
|
|
|
|
|
|
```
|
... | ... | @@ -220,24 +221,39 @@ Destination 选择 "Frameworks" -> |
|
|
|
|
|
|
|
|
|
|
|
## 2.3 日志存储
|
|
|
## 2.3 日志存储2.3 日志存储 *( 3.17.7 升级须知,必须添加该方法)
|
|
|
|
|
|
|
|
|
|
|
|
#### <font color = red>注:日志收集功能为 **必选项** ,本地接入需要使用最新的 CCBundle 资源文件</font>
|
|
|
|
|
|
| 新增依赖库 | Cocoapods 接入 | 本地接入 | 签名选择 |
|
|
|
| ------------------------------------ | ------------------------ | --------------------------------------------------- | ------------ |
|
|
|
| CCFuncTool.framework (动态库) | pod 'HDSCCFuncTool' | 下载zip包中 CCFuncTool 文件夹下,拖入项目中 | Embed & Sign |
|
|
|
| SSZipArchive.framework (动态库) | pod 'HDSSZip' | 下载zip包中 CCFuncTool 文件夹下,拖入项目中 | Embed & Sign |
|
|
|
| CocoaLumberjack.framework (动态库) | pod 'HDSCocoaLumberjack' | 下载zip包中 HDSCocoaLumberjack 文件夹下,拖入项目中 | Embed & Sign |
|
|
|
|
|
|
|
|
|
|
|
|
在AppDelegate.m文件导入头文件
|
|
|
|
|
|
```
|
|
|
#import "CCSDK/SaveLogUtil.h"
|
|
|
```objc
|
|
|
#import "CCSDK/HDSPreserve.h"
|
|
|
```
|
|
|
|
|
|
在启动方法中添加日志存储
|
|
|
|
|
|
```
|
|
|
```objc
|
|
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
|
|
/**
|
|
|
* @brief 是否存储日志
|
|
|
*/
|
|
|
[[SaveLogUtil sharedInstance]isNeedToSaveLog:YES];
|
|
|
// 日志收集
|
|
|
[[HDSPreserve shared] HDSApplicationDidFinishLaunching];
|
|
|
return YES;
|
|
|
}
|
|
|
|
|
|
- (void)applicationWillTerminate:(UIApplication *)application {
|
|
|
// 日志收集
|
|
|
[[HDSPreserve shared] HDSApplicationWillTerminate];
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## 2.4 错误码
|
... | ... | @@ -251,6 +267,7 @@ Destination 选择 "Frameworks" -> |
|
|
ERROR_USELESS_INFO = 1002 没有获取到有用的视频信息
|
|
|
ERROR_PASSWORD = 1003 密码错误
|
|
|
```
|
|
|
|
|
|
系统错误类型
|
|
|
|
|
|
```
|
... | ... | @@ -380,7 +397,6 @@ _offlinePlayBack = [[OfflinePlayBack alloc] initSDKWithParameter:parameter succe |
|
|
配置参数:PlayParameter的属性如下
|
|
|
|
|
|
```objective-c
|
|
|
|
|
|
/**
|
|
|
* @brief 文档父类窗口
|
|
|
*/
|
... | ... | @@ -490,6 +506,10 @@ _offlinePlayBack = [[OfflinePlayBack alloc] initSDKWithParameter:parameter succe |
|
|
startTime //开始时间 }
|
|
|
*/
|
|
|
-(void)liveInfo:(NSDictionary *)dic;
|
|
|
/**
|
|
|
* @brief 媒体准备完成
|
|
|
*/
|
|
|
- (void)mediaPrepared;
|
|
|
```
|
|
|
|
|
|
3.2.2 主动方法(可选)
|
... | ... | @@ -582,6 +602,17 @@ _offlinePlayBack = [[OfflinePlayBack alloc] initSDKWithParameter:parameter succe |
|
|
* 2 非动画文档加载完成
|
|
|
*/
|
|
|
- (void)docLoadCompleteWithIndex:(NSInteger)index;
|
|
|
/**
|
|
|
* @brief 所有数据准备完成
|
|
|
*
|
|
|
* 数据准备完成后,才能主动获取全量数据
|
|
|
* 获取全量聊天数据:- (void)fetchAllChat:(void (^)(NSArray * results))completion;
|
|
|
* 获取全量问答数据:- (void)fetchAllQA:(void (^)(NSDictionary * results))completion;
|
|
|
* 获取全量广播数据:- (void)fetchAllBroadcast:(void (^)(NSArray * results))completion;
|
|
|
* 获取全量随堂测数据:- (void)fetchAllPractic:(void (^)(NSArray * results))completion;
|
|
|
* 获取全量翻页数据:- (void)fetchAllPageChange:(void (^)(NSArray *results))completion;
|
|
|
*/
|
|
|
- (void)dataPrepared;
|
|
|
```
|
|
|
|
|
|
3.3.2 主动方法(可选)
|
... | ... | @@ -608,6 +639,11 @@ _offlinePlayBack = [[OfflinePlayBack alloc] initSDKWithParameter:parameter succe |
|
|
* 3 = 等比填充:PPT内容保持原始比例,以横向或纵向适应显示区域,另一方向将会超出显示区域,超出部分会被裁减,不会存在黑边
|
|
|
*/
|
|
|
- (void)changeDocPPTScalingMode:(NSInteger)pptScalingMode;
|
|
|
/**
|
|
|
* @brief 获取全量翻页数据
|
|
|
* @param completion 数据回调
|
|
|
*/
|
|
|
- (void)fetchAllPageChange:(void (^)(NSArray *results))completion;
|
|
|
```
|
|
|
|
|
|
|
... | ... | @@ -632,6 +668,16 @@ _offlinePlayBack = [[OfflinePlayBack alloc] initSDKWithParameter:parameter succe |
|
|
-(void)offline_roomInfo:(NSDictionary *)dic;
|
|
|
```
|
|
|
|
|
|
房间配置信息(代理方法)
|
|
|
|
|
|
```objc
|
|
|
/// 房间配置信息
|
|
|
/// @param dic 配置信息
|
|
|
- (void)offline_roomConfiguration:(NSDictionary *)dic;
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## 3.5 聊天功能
|
|
|
|
|
|
代理方法(可选)
|
... | ... | @@ -650,6 +696,18 @@ _offlinePlayBack = [[OfflinePlayBack alloc] initSDKWithParameter:parameter succe |
|
|
-(void)offline_onParserChat:(NSArray *)arr;
|
|
|
```
|
|
|
|
|
|
获取全量聊天数据(主动方法)
|
|
|
|
|
|
```objc
|
|
|
/**
|
|
|
* @brief 获取全量聊天数据
|
|
|
* @param completion 数据回调
|
|
|
*/
|
|
|
- (void)fetchAllChat:(void (^)(NSArray * results))completion;
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.6 问答功能
|
... | ... | @@ -680,6 +738,18 @@ _offlinePlayBack = [[OfflinePlayBack alloc] initSDKWithParameter:parameter succe |
|
|
- (void)offline_onParserQuestionArr:(NSArray *)questionArr onParserAnswerArr:(NSArray *)answerArr;
|
|
|
```
|
|
|
|
|
|
获取全量问答数据(主动方法)
|
|
|
|
|
|
```objc
|
|
|
/**
|
|
|
* @brief 获取全量问答数据
|
|
|
* @param completion 数据回调
|
|
|
*/
|
|
|
- (void)fetchAllQA:(void (^)(NSArray * results))completion;
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.7 广播功能
|
... | ... | @@ -695,6 +765,20 @@ _offlinePlayBack = [[OfflinePlayBack alloc] initSDKWithParameter:parameter succe |
|
|
- (void)broadcastHistory_msg:(NSArray *)array;
|
|
|
```
|
|
|
|
|
|
获取全量广播数据(主动方法)
|
|
|
|
|
|
```objc
|
|
|
/**
|
|
|
* @brief 获取全量广播数据
|
|
|
* @param completion 数据回调
|
|
|
*/
|
|
|
- (void)fetchAllBroadcast:(void (^)(NSArray * results))completion;
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.8 视频播放状态
|
|
|
|
|
|
播放器状态类型
|
... | ... | @@ -782,6 +866,34 @@ typedef NS_ENUM(NSUInteger, HDSMediaFinishReason) { |
|
|
|
|
|
PS:防录屏功能拆分到demo层处理,具体实现参考 4.0.0 demo
|
|
|
|
|
|
|
|
|
|
|
|
## 3.10 校验文件MD5
|
|
|
|
|
|
```objc
|
|
|
/// 校验文件MD5值
|
|
|
/// @param filePath 文件路径
|
|
|
/// @param MD5 源文件MD5值
|
|
|
/// @return YES 文件正常 / NO 文件已损坏
|
|
|
- (BOOL)HDSCheckFileMD5:(NSString *)filePath MD5:(NSString *)MD5;
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## 3.11 获取全量随堂测数据
|
|
|
|
|
|
主动方法
|
|
|
|
|
|
```objc
|
|
|
/**
|
|
|
* @brief 获取全量随堂测数据
|
|
|
* @param completion 数据回调
|
|
|
*/
|
|
|
- (void)fetchAllPractic:(void (^)(NSArray * results))completion;
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
# 4.常见问题
|
|
|
|
|
|
## 4.1 旋转屏错误
|
... | ... | |