# KingReaderSDK **Repository Path**: jzxyouok/KingReaderSDK ## Basic Information - **Project Name**: KingReaderSDK - **Description**: 开卷有益iOS 客户端 SDK - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2016-05-16 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 开卷有益 iOS SDK接入 ## KingReaderSDKDemo运行说明 为了避免Demo过大造成的一些更新问题,demo里面没有包含pod文件,在运行demo前请先用命令行切换到KingReaderSDKDemo目录,运行pod install命令。[cocoapods使用指导](https://guides.cocoapods.org/using/using-cocoapods.html) ## 集成SDK 由于SDK依赖的第三方库很多,所以推荐使用cocoapods来集成 [开卷有益SDK](https://git.oschina.net/kingreader/KingReaderSDK.git) ######cocoapods依赖库列表(包含了开卷SDK本身): #KingReaderSDK pod 'KingReaderSDK', :git => 'https://git.oschina.net/kingreader/KingReaderSDK.git' #原始第三方sdk pod 'SDWebImage' pod 'UnrarKit' pod 'AFNetworking', '~> 2.6.3' pod 'VBFPopFlatButton' pod 'SSZipArchive' #自己创建的库 pod 'COTools', :git => 'https://git.oschina.net/kingreader/COTools.git' pod 'LZMASDK', :git => 'https://git.oschina.net/kingreader/LZMASDK.git' pod 'SVProgressForKR', :git => 'https://git.oschina.net/kingreader/SVProgressForKR.git' pod 'TJJRefresh', :git => 'https://git.oschina.net/kingreader/TJJRefresh.git' pod 'GCDWebServer', :git => 'https://git.oschina.net/kingreader/GCDWebServer.git' pod 'TalkingDataSDK', :git => 'https://git.oschina.net/kingreader/TalkingDataSDK.git' pod 'GDTSDK_KR', :git => 'https://git.oschina.net/kingreader/GDTSDK_KR.git' ## SDK使用 1. 导入头文件 #import "KingReaderSDK.h" 2. 用户对应用的颜色进行自定制, 目前我们提供了navigationBar和tabBar的颜色接口: ``` [KingReaderSDK setTabbarNormalColor:[UIColor yellowColor]]; [KingReaderSDK setNavigationBackgroundColor:[UIColor darkGrayColor]]; ``` 3. 配置是否开启广点通的广告:(默认关闭广告) ``` [KingReaderSDK setGDTTurnOn]; ``` 4. 判断是否处于登陆状态,如果未登录,则先登陆,成功后获取根视图控制器,push到NavigationController中,代码如下: ``` if (![KingReaderSDK isLogined]) { //用第三方账号登陆 [KingReaderSDK loginWithUniqueId:@"efadfae2f2fq23fqdafsdf3f2" completeBlock:^(NSString *error, BOOL succeed) { if (succeed) { UIViewController *vc = [KingReaderSDK rootViewController]; [self.navigationController pushViewController:vc animated:YES]; } }]; } else { UIViewController *vc = [KingReaderSDK rootViewController]; [self.navigationController pushViewController:vc animated:YES]; } ``` ## 支持 商务&产品支持联系qq:546922078(周) 技术支持开发人员qq:328768132(王)