Commit 017917f2dcc178340c173732574f5df49a34c668
1 parent
d3e6d229
提交0.1.0
Showing
9 changed files
with
619 additions
and
11 deletions
CNAudioOrVideoMananger.podspec
| @@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
| 9 | Pod::Spec.new do |s| | 9 | Pod::Spec.new do |s| |
| 10 | s.name = 'CNAudioOrVideoMananger' | 10 | s.name = 'CNAudioOrVideoMananger' |
| 11 | s.version = '0.1.0' | 11 | s.version = '0.1.0' |
| 12 | - s.summary = 'A short description of CNAudioOrVideoMananger.' | 12 | + s.summary = '音视频通话' |
| 13 | 13 | ||
| 14 | # This description is used to generate tags and improve search results. | 14 | # This description is used to generate tags and improve search results. |
| 15 | # * Think: What does it do? Why did you write it? What is the focus? | 15 | # * Think: What does it do? Why did you write it? What is the focus? |
| @@ -18,25 +18,40 @@ Pod::Spec.new do |s| | @@ -18,25 +18,40 @@ Pod::Spec.new do |s| | ||
| 18 | # * Finally, don't worry about the indent, CocoaPods strips it! | 18 | # * Finally, don't worry about the indent, CocoaPods strips it! |
| 19 | 19 | ||
| 20 | s.description = <<-DESC | 20 | s.description = <<-DESC |
| 21 | -TODO: Add long description of the pod here. | 21 | + 音视频通话 |
| 22 | DESC | 22 | DESC |
| 23 | 23 | ||
| 24 | - s.homepage = 'https://github.com/jyyjkt/CNAudioOrVideoMananger' | 24 | + s.homepage = 'http://bj.gitlab.cnlive.com/ios-team/CNAudioOrVideoMananger' |
| 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' | 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' |
| 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } | 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } |
| 27 | s.author = { 'jyyjkt' => 'jyyjkt@qq.com' } | 27 | s.author = { 'jyyjkt' => 'jyyjkt@qq.com' } |
| 28 | - s.source = { :git => 'https://github.com/jyyjkt/CNAudioOrVideoMananger.git', :tag => s.version.to_s } | 28 | + s.source = { :git => 'http://bj.gitlab.cnlive.com/ios-team/CNAudioOrVideoMananger.git', :tag => s.version.to_s } |
| 29 | # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>' | 29 | # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>' |
| 30 | 30 | ||
| 31 | - s.ios.deployment_target = '8.0' | 31 | + s.ios.deployment_target = '9.0' |
| 32 | 32 | ||
| 33 | s.source_files = 'CNAudioOrVideoMananger/Classes/**/*' | 33 | s.source_files = 'CNAudioOrVideoMananger/Classes/**/*' |
| 34 | 34 | ||
| 35 | +# s.pod_target_xcconfig = { 'VALID_ARCHS[sdk=iphonesimulator*]' => 'CNLiveTripartiteManagement/PLShortVideoKit' } | ||
| 36 | + | ||
| 35 | # s.resource_bundles = { | 37 | # s.resource_bundles = { |
| 36 | # 'CNAudioOrVideoMananger' => ['CNAudioOrVideoMananger/Assets/*.png'] | 38 | # 'CNAudioOrVideoMananger' => ['CNAudioOrVideoMananger/Assets/*.png'] |
| 37 | # } | 39 | # } |
| 38 | 40 | ||
| 39 | # s.public_header_files = 'Pod/Classes/**/*.h' | 41 | # s.public_header_files = 'Pod/Classes/**/*.h' |
| 40 | - # s.frameworks = 'UIKit', 'MapKit' | 42 | + s.frameworks = 'UIKit' |
| 41 | # s.dependency 'AFNetworking', '~> 2.3' | 43 | # s.dependency 'AFNetworking', '~> 2.3' |
| 44 | + | ||
| 45 | +# s.dependency 'CNLiveTripartiteManagement/QMUIKit' | ||
| 46 | +# s.dependency 'CNLiveRequestBastKit' | ||
| 47 | +# s.dependency 'CNLiveBaseKit' | ||
| 48 | +# s.dependency 'CNLiveTripartiteManagement/SDWebImage' | ||
| 49 | +# s.dependency 'CNLiveCommonCategory' | ||
| 50 | +# s.dependency 'CNLiveTripartiteManagement/YYKit' | ||
| 51 | +# s.dependency 'CNLiveUserManagement' | ||
| 52 | +# s.dependency 'CNLiveBusinessTools' | ||
| 53 | +# s.dependency 'CNLiveEnvironment' | ||
| 54 | +# s.dependency 'CNLiveIMBaseSDK' | ||
| 55 | +# s.dependency 'CNLiveTripartiteManagement/TXLiteAVSDK_TRTC' | ||
| 56 | + | ||
| 42 | end | 57 | end |
CNAudioOrVideoMananger/Classes/.gitkeep deleted
100644 → 0
CNAudioOrVideoMananger/Classes/CNAudioOrVideoMananger.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNAudioOrVideoMananger.h | ||
| 3 | +// CNLiveNetAdd | ||
| 4 | +// | ||
| 5 | +// Created by 梁星国 on 2019/3/26. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | +#import <CNVideoOrAudioWindow.h> | ||
| 11 | +#import <objc/runtime.h> | ||
| 12 | + | ||
| 13 | +NS_ASSUME_NONNULL_BEGIN | ||
| 14 | + | ||
| 15 | + | ||
| 16 | +#pragma mark - 音视频状态 | ||
| 17 | +/*** 发送超时限制60秒 ***/ | ||
| 18 | +#define kSendTimerLength 60 | ||
| 19 | +/*** 发送中未接听提示限制39秒 ***/ | ||
| 20 | +#define kSenderTipTimerL 30 | ||
| 21 | +/*** 监听双方是否在房间 ***/ | ||
| 22 | +#define kListenTimerLength 10 | ||
| 23 | + | ||
| 24 | +/*** 小窗 ***/ | ||
| 25 | +typedef NS_ENUM(NSUInteger, CNChatVideoOrAudioWindowKind) { | ||
| 26 | + CNChatVideoOrAudioWindowKindFull = 1,//默认全屏 | ||
| 27 | + CNChatVideoOrAudioWindowKindWindow = 2,//窗口 | ||
| 28 | +}; | ||
| 29 | + | ||
| 30 | +/*** 发送方进入,接收方 ***/ | ||
| 31 | +typedef NS_ENUM(NSUInteger, CNChatVideoOrAudioEnterType) { | ||
| 32 | + CNChatVideoOrAudioEnterTypeSender = 1,//发送者 | ||
| 33 | + CNChatVideoOrAudioEnterTypeReceiver = 2,//接收者 | ||
| 34 | +}; | ||
| 35 | + | ||
| 36 | +/*** 音视频通话方式 ***/ | ||
| 37 | +typedef NS_ENUM(NSUInteger, CNChatVideoOrAudioCallKind) { | ||
| 38 | + CNChatVideoOrAudioCallKindAudio = 1,//音频 | ||
| 39 | + CNChatVideoOrAudioCallKindVideo = 2,//视频 | ||
| 40 | +}; | ||
| 41 | + | ||
| 42 | +/*** 请求状态 ***/ | ||
| 43 | +typedef NS_ENUM(NSUInteger, CNChatVideoOrAudioStatus) { | ||
| 44 | + CNChatVideoOrAudioStatusRequest = 1,//(发送,接收) | ||
| 45 | + CNChatVideoOrAudioStatusRefused = 2,//拒绝 | ||
| 46 | + CNChatVideoOrAudioStatusCall = 3,//通话中 | ||
| 47 | + CNChatVideoOrAudioStatusHangUp = 4,//挂断 | ||
| 48 | +}; | ||
| 49 | + | ||
| 50 | +#pragma mark - 音视频 - 通知 | ||
| 51 | +// 音视频 | ||
| 52 | +#ifndef WjjChatAudioOrVideoNotifacation | ||
| 53 | +#define WjjChatAudioOrVideoNotifacation @"WjjChatAudioOrVideoNotifacation" | ||
| 54 | +#endif | ||
| 55 | + | ||
| 56 | +#pragma mark - 音视频 | ||
| 57 | +#define CNVideoOrAudioEnterNotification @"CNVideoOrAudioEnterNotification" //进入音视频通知 | ||
| 58 | +#define CNVideoOrAudioOutNotification @"CNVideoOrAudioOutNotification" //退出音视频 | ||
| 59 | + | ||
| 60 | +#define CNVideoOrAudioSenderMsgNotification @"CNVideoOrAudioSenderMsgNotification" //退出发送方消息 | ||
| 61 | + | ||
| 62 | +#pragma mark - 音视频消息退出回调 - 通知内容 | ||
| 63 | +static NSString *const Notification_SenderOutMsg = @"IMMSG_Notification_SenderOutMsg";//发送方退出消息回调 | ||
| 64 | +static NSString *const Notification_ConversationID = @"IMMSG_Notification_ConversationID";//会话ID | ||
| 65 | + | ||
| 66 | + | ||
| 67 | +#pragma mark - 音视频和音频 - 通知内容 | ||
| 68 | +static NSString *const Notification_Type = @"IMMSG_Notification_Type";//进入通知Key | ||
| 69 | +static NSString *const Notification_VideoOrAudio = @"IMMSG_Notification_VideoOrAudio";//通知-音视频 | ||
| 70 | +static NSString *const Notification_ListenChina = @"IMMSG_Notification_ListenChina";//通知-听见中国 | ||
| 71 | + | ||
| 72 | +#pragma mark - 音视频 - 好友关系和黑名单关系 | ||
| 73 | +static NSString * const IMMSG_CheckResult_Type_NoRelation = @"CheckResult_Type_NoRelation";//双方是好友关系 | ||
| 74 | +static NSString * const IMMSG_CheckResult_Type_BWithA = @"CheckResult_Type_BWithA";//对方拉黑我 | ||
| 75 | +static NSString * const IMMSG_CheckResult_Type_AWithB = @"CheckResult_Type_AWithB";//我拉黑对方 | ||
| 76 | +static NSString * const IMMSG_CheckResult_delete_Type_BWithA = @"CheckResult_delete_Type_BWithA";//对方删除我 | ||
| 77 | +static NSString * const IMMSG_CheckResult_Type_BothWay = @"CheckResult_Type_BothWay";//互相拉黑对方 | ||
| 78 | + | ||
| 79 | +/*** 音视频key ***/ | ||
| 80 | +static NSString *const IMMSG_Content = @"content"; | ||
| 81 | +static NSString *const IMMSG_Status = @"status"; | ||
| 82 | +static NSString *const IMMSG_Kind = @"kind"; | ||
| 83 | +static NSString *const IMMSG_IsSender = @"isSender"; | ||
| 84 | +static NSString *const IMMSG_Receiver = @"receiver"; | ||
| 85 | +static NSString *const IMMSG_RoomId = @"roomId"; | ||
| 86 | +static NSString *const IMMSG_RoomKey = @"roomKey"; | ||
| 87 | +static NSString *const IMMSG_ConversationType = @"conversationType"; | ||
| 88 | +static NSString *const IMMSG_Duration = @"duration"; | ||
| 89 | +static NSString *const IMMSG_CreateTime = @"createTime";//房间创建时间 | ||
| 90 | +static NSString *const IMMSG_SendTime = @"sendTime";//消息发送时间 | ||
| 91 | +static NSString *const IMMSG_IsEnter = @"isEnter";//是否进入房间(消息是房间内发,还是房间外发) | ||
| 92 | + | ||
| 93 | +/*** 音视频value ***/ | ||
| 94 | +static NSString *const IMMSG_Invite = @"invite";//邀请 | ||
| 95 | +static NSString *const IMMSG_Answer = @"answer";//接听 | ||
| 96 | +static NSString *const IMMSG_SwitchAudio = @"switchAudio";//切换音频 | ||
| 97 | +//static NSString *const IMMSG_OutRoom = @"outRoom";//退出房间 | ||
| 98 | +static NSString *const IMMSG_Audio = @"Audio";//音频 | ||
| 99 | +static NSString *const IMMSG_Video = @"Video";//视频 | ||
| 100 | +static NSString *const IMMSG_Group = @"Group";//群聊 | ||
| 101 | +static NSString *const IMMSG_Private = @"Private";//单聊 | ||
| 102 | +static NSString *const IMMSG_Busy = @"busy";//繁忙 | ||
| 103 | + | ||
| 104 | +static NSString *const IMMSG_Refuse = @"refuse";//拒绝 | ||
| 105 | +static NSString *const IMMSG_CallBack = @"callBack";//通话中挂断(发送者,接受者) | ||
| 106 | +static NSString *const IMMSG_Cancle = @"cancle";//取消(发送者) | ||
| 107 | +//static NSString *const IMMSG_HangUp = @"hangUp";//对方挂断(接收者) | ||
| 108 | +static NSString *const IMMSG_SwitchAndAnswer = @"switchAndAnswer";//切换并接通(接收方) | ||
| 109 | + | ||
| 110 | +#pragma mark - 监听 | ||
| 111 | +static NSString *const IMMSG_Source = @"source";//监听key | ||
| 112 | +static NSString *const IMMSG_ListenSender = @"sender";//监听发送者 | ||
| 113 | +static NSString *const IMMSG_ListenReceiver = @"receiver";//监听接受者 | ||
| 114 | +static NSString *const IMMSG_CurrentTime = @"currentTime";//发送消息时间 | ||
| 115 | +//static NSString *const IMMSG_UnResponseOut = @"unResponseOut";//未响应退出 | ||
| 116 | + | ||
| 117 | +#pragma mark - TODO: 音视频 | ||
| 118 | +static NSString *const IMMSG_Interrupt = @"interrupt";//中断(接收方中来电话) | ||
| 119 | +static NSString *const IMMSG_ConnectFailed = @"connectFailed";//中断(发起者来电话) | ||
| 120 | + | ||
| 121 | + | ||
| 122 | +#pragma mark - 音视频UserDefault | ||
| 123 | +static NSString *const USER_IsEnter = @"isEnter";//是否进入 | ||
| 124 | +static NSString *const USER_InRoom = @"inRoom";//自己在房间 | ||
| 125 | +static NSString *const USER_InOtherRoom = @"inOtherRoom";//其他人进入房间 | ||
| 126 | +static NSString *const USER_RoomID = @"roomID";//房间ID | ||
| 127 | +static NSString *const USER_RoomPW = @"roomPW";//房间秘钥 | ||
| 128 | +static NSString *const USER_CreatTimer = @"creatTimer";//房间建立时间戳 | ||
| 129 | +static NSString *const USER_Status = @"status";//状态 | ||
| 130 | + | ||
| 131 | +static NSString *const USER_RequestStatus = @"requestStatus";//请求状态 | ||
| 132 | +static NSString *const USER_CallStatus = @"callStatus";//接通状态 | ||
| 133 | + | ||
| 134 | +//音视频通话 | ||
| 135 | +#define wjjPersonIsEnterRoomKey @"wjjPersonIsEnterRoomKey" | ||
| 136 | + | ||
| 137 | + | ||
| 138 | + | ||
| 139 | + | ||
| 140 | +typedef void(^EnterRoomVCEditBlock)(void); | ||
| 141 | + | ||
| 142 | +@interface CNAudioOrVideoMananger : NSObject | ||
| 143 | + | ||
| 144 | +/*** 初始化音视频UserDefault ***/ | ||
| 145 | ++ (BOOL)InitializeDefault; | ||
| 146 | + | ||
| 147 | +/*** 是否进入 ***/ | ||
| 148 | ++ (BOOL)IsEnter; | ||
| 149 | + | ||
| 150 | +/*** 编辑Default ***/ | ||
| 151 | ++ (BOOL)EditDefaultWithDic:(NSDictionary *)enterDic; | ||
| 152 | + | ||
| 153 | +/*** 获取信息 ***/ | ||
| 154 | ++ (NSDictionary *)GetDefaultDic; | ||
| 155 | + | ||
| 156 | +/*** 进入音视频前的编辑其他视图控制器 ***/ | ||
| 157 | ++ (void)EnterVideoOrAudioEditVC:(EnterRoomVCEditBlock)block; | ||
| 158 | + | ||
| 159 | + | ||
| 160 | +#pragma mark - 用于音视频通话视图中(按顺序写) | ||
| 161 | +/*** 是否进入音视频视图 ***/ | ||
| 162 | ++ (void)IsEnterDic:(BOOL)isEnter; | ||
| 163 | + | ||
| 164 | +/*** 自己是否进入房间 ***/ | ||
| 165 | ++ (void)IsEnterRoomDic:(BOOL)isEnterRoom; | ||
| 166 | + | ||
| 167 | +/*** 其他人是否进入房间 ***/ | ||
| 168 | ++ (void)IsOtherEnterRoomDic:(BOOL)isOtherEnterRoom; | ||
| 169 | + | ||
| 170 | +/*** 音视频访问状态 ***/ | ||
| 171 | ++ (void)UserCallStatus:(NSString *)callStatus; | ||
| 172 | + | ||
| 173 | + | ||
| 174 | + | ||
| 175 | +@end | ||
| 176 | + | ||
| 177 | +NS_ASSUME_NONNULL_END |
CNAudioOrVideoMananger/Classes/CNAudioOrVideoMananger.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNAudioOrVideoMananger.m | ||
| 3 | +// CNLiveNetAdd | ||
| 4 | +// | ||
| 5 | +// Created by 梁星国 on 2019/3/26. | ||
| 6 | +// Copyright © 2019年 cnlive. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import "CNAudioOrVideoMananger.h" | ||
| 10 | + | ||
| 11 | +#pragma mark - TODO: 2019_11_18 注释 | ||
| 12 | +//#import "CNPlayFullScreenViewController.h" | ||
| 13 | +//#import "LVCFullScreenPlayerController.h" | ||
| 14 | +//#import "XFCameraController.h" | ||
| 15 | +////////////////// | ||
| 16 | + | ||
| 17 | +/*** 发送时长60秒 ***/ | ||
| 18 | +#define kSendTimerLength 60 | ||
| 19 | + | ||
| 20 | +@implementation CNAudioOrVideoMananger | ||
| 21 | + | ||
| 22 | ++ (BOOL)InitializeDefault { | ||
| 23 | + | ||
| 24 | + /*** 更改本地用户进入信息 ***/ | ||
| 25 | + NSDictionary *enterDic = @{ | ||
| 26 | + USER_IsEnter:@0, | ||
| 27 | + USER_InRoom:@0, | ||
| 28 | + USER_InOtherRoom:@0, | ||
| 29 | + USER_RoomID:@"", | ||
| 30 | + USER_RoomPW:@"", | ||
| 31 | + USER_CreatTimer:@"", | ||
| 32 | + USER_Status:@"" | ||
| 33 | + }.copy; | ||
| 34 | + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; | ||
| 35 | + [userDefaults setObject:enterDic forKey:wjjPersonIsEnterRoomKey]; | ||
| 36 | + BOOL isResult = [userDefaults synchronize]; | ||
| 37 | + return isResult; | ||
| 38 | + | ||
| 39 | +} | ||
| 40 | + | ||
| 41 | +#pragma mark - TODO: ISEnter | ||
| 42 | ++ (BOOL)IsEnter { | ||
| 43 | + | ||
| 44 | + BOOL isEnter = NO; | ||
| 45 | + | ||
| 46 | + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; | ||
| 47 | + NSDictionary *enterDic = [userDefaults objectForKey:wjjPersonIsEnterRoomKey]; | ||
| 48 | + | ||
| 49 | + if (enterDic.count == 0 || !enterDic) {//无数据 | ||
| 50 | + /*** 初始化数据 ***/ | ||
| 51 | + [CNAudioOrVideoMananger InitializeDefault]; | ||
| 52 | + isEnter = NO; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + NSInteger isEnterCount = [enterDic[USER_IsEnter] integerValue]; | ||
| 56 | + if (isEnterCount == 0) {//本地状态为未进入 | ||
| 57 | + isEnter = NO; | ||
| 58 | + }else {//本地状态为进入 | ||
| 59 | + | ||
| 60 | + isEnter = YES; | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + /*** 最后判断 ***/ | ||
| 64 | + BOOL isResult = NO; | ||
| 65 | + if (isEnter) {//本地状态为进入 | ||
| 66 | + __block BOOL isHave = NO; | ||
| 67 | + NSMutableArray *windows = [UIApplication sharedApplication].windows.mutableCopy; | ||
| 68 | + [windows enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { | ||
| 69 | + | ||
| 70 | + NSString *windowName = [NSString stringWithUTF8String:class_getName([obj class])]; | ||
| 71 | + NSString *className = [NSString stringWithUTF8String:class_getName([CNVideoOrAudioWindow class])]; | ||
| 72 | + | ||
| 73 | + NSLog(@"输出 windowName = %@ equal className = %@",windowName,className); | ||
| 74 | + if ([windowName isEqual:className]) { | ||
| 75 | + isHave = YES; | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + }]; | ||
| 79 | + | ||
| 80 | + if (isHave) {//本地有+视图有 | ||
| 81 | + isResult = YES; | ||
| 82 | + }else { | ||
| 83 | + /*** 初始化 ***/ | ||
| 84 | + [CNAudioOrVideoMananger InitializeDefault]; | ||
| 85 | + isResult = NO; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + }else {//本地未进入 | ||
| 89 | + | ||
| 90 | + __block CNVideoOrAudioWindow *videoOrAudioWindow = nil; | ||
| 91 | + NSMutableArray *windows = [UIApplication sharedApplication].windows.mutableCopy; | ||
| 92 | + [windows enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { | ||
| 93 | + | ||
| 94 | + NSString *windowName = [NSString stringWithUTF8String:class_getName([obj class])]; | ||
| 95 | + NSString *className = [NSString stringWithUTF8String:class_getName([CNVideoOrAudioWindow class])]; | ||
| 96 | + | ||
| 97 | + NSLog(@"输出 windowName = %@ equal className = %@",windowName,className); | ||
| 98 | + if ([windowName isEqual:className]) { | ||
| 99 | + videoOrAudioWindow = obj; | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + }]; | ||
| 103 | + | ||
| 104 | + if (videoOrAudioWindow) {//本地无+视图有 | ||
| 105 | + /*** 初始化 ***/ | ||
| 106 | + [CNAudioOrVideoMananger InitializeDefault]; | ||
| 107 | + isResult = NO; | ||
| 108 | + }else {//本地无+视图无 | ||
| 109 | + /*** 初始化 ***/ | ||
| 110 | + [CNAudioOrVideoMananger InitializeDefault]; | ||
| 111 | + isResult = NO; | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + return isResult; | ||
| 117 | + | ||
| 118 | +} | ||
| 119 | + | ||
| 120 | +/*** 编辑Defaults ***/ | ||
| 121 | ++ (BOOL)EditDefaultWithDic:(NSDictionary *)enterDic { | ||
| 122 | + | ||
| 123 | + if (enterDic.count <= 0) { | ||
| 124 | + return NO; | ||
| 125 | + } | ||
| 126 | + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; | ||
| 127 | + [userDefaults setObject:enterDic forKey:wjjPersonIsEnterRoomKey]; | ||
| 128 | + BOOL isResult = [userDefaults synchronize]; | ||
| 129 | + return isResult; | ||
| 130 | +} | ||
| 131 | + | ||
| 132 | +/*** 获取信息 ***/ | ||
| 133 | ++ (NSMutableDictionary *)GetDefaultDic { | ||
| 134 | + | ||
| 135 | + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; | ||
| 136 | + NSDictionary *enterDic = [userDefaults objectForKey:wjjPersonIsEnterRoomKey]; | ||
| 137 | + if (enterDic.count == 0 || !enterDic) { | ||
| 138 | + return [NSMutableDictionary dictionary]; | ||
| 139 | + }else { | ||
| 140 | + return enterDic.mutableCopy; | ||
| 141 | + } | ||
| 142 | + | ||
| 143 | +} | ||
| 144 | + | ||
| 145 | +/*** 进入音视频前的编辑其他视图控制器 ***/ | ||
| 146 | ++(void)EnterVideoOrAudioEditVC:(EnterRoomVCEditBlock)block { | ||
| 147 | + | ||
| 148 | + NSInteger timeCount = 0.1; | ||
| 149 | + #pragma mark - TODO: 2019_11_18 注释 | ||
| 150 | +// UIViewController *VC = [UIWindow currentViewController]; | ||
| 151 | +// if ([VC isKindOfClass:[CNPlayFullScreenViewController class]]) { | ||
| 152 | +// [[NSNotificationCenter defaultCenter] postNotificationName:CNRatatePortraitNotication object:nil]; | ||
| 153 | +// timeCount = 1.5; | ||
| 154 | +// } | ||
| 155 | +// | ||
| 156 | +// if ([VC isKindOfClass:[LVCFullScreenPlayerController class]]) { | ||
| 157 | +// [[NSNotificationCenter defaultCenter] postNotificationName:CNRatatePortraitNotication object:nil]; | ||
| 158 | +// timeCount = 1.5; | ||
| 159 | +// } | ||
| 160 | +// | ||
| 161 | +// if ([VC isKindOfClass:[XFCameraController class]]) { | ||
| 162 | +// [VC dismissViewControllerAnimated:YES completion:^{ | ||
| 163 | +// | ||
| 164 | +// }]; | ||
| 165 | +// timeCount = 1.5; | ||
| 166 | +// | ||
| 167 | +// } | ||
| 168 | + ////////////////// | ||
| 169 | + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(timeCount * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | ||
| 170 | + block(); | ||
| 171 | + }); | ||
| 172 | + | ||
| 173 | +} | ||
| 174 | + | ||
| 175 | +#pragma mark - 用于音视频通话视图中(按顺序写) | ||
| 176 | +/*** 是否进入音视频视图 ***/ | ||
| 177 | ++ (void)IsEnterDic:(BOOL)isEnter { | ||
| 178 | + | ||
| 179 | + NSMutableDictionary *dic = (NSMutableDictionary *)[CNAudioOrVideoMananger GetDefaultDic]; | ||
| 180 | + if (dic.count <= 0) { | ||
| 181 | + [CNAudioOrVideoMananger InitializeDefault]; | ||
| 182 | + if (isEnter) { | ||
| 183 | + NSMutableDictionary *resultDic = (NSMutableDictionary *)[CNAudioOrVideoMananger GetDefaultDic]; | ||
| 184 | + [resultDic setValue:@1 forKey:USER_IsEnter]; | ||
| 185 | + [CNAudioOrVideoMananger EditDefaultWithDic:resultDic]; | ||
| 186 | + | ||
| 187 | + } | ||
| 188 | + }else { | ||
| 189 | + if (isEnter) { | ||
| 190 | + [dic setValue:@1 forKey:USER_IsEnter]; | ||
| 191 | + [CNAudioOrVideoMananger EditDefaultWithDic:dic]; | ||
| 192 | + }else { | ||
| 193 | + [CNAudioOrVideoMananger InitializeDefault]; | ||
| 194 | + } | ||
| 195 | + | ||
| 196 | + } | ||
| 197 | + | ||
| 198 | +} | ||
| 199 | + | ||
| 200 | +/*** 自己是否进入房间 ***/ | ||
| 201 | ++ (void)IsEnterRoomDic:(BOOL)isEnterRoom { | ||
| 202 | + NSMutableDictionary *dic = (NSMutableDictionary *)[CNAudioOrVideoMananger GetDefaultDic]; | ||
| 203 | + if (dic.count <= 0) { | ||
| 204 | + [CNAudioOrVideoMananger InitializeDefault]; | ||
| 205 | + NSMutableDictionary *resultDic = (NSMutableDictionary *)[CNAudioOrVideoMananger GetDefaultDic]; | ||
| 206 | + [resultDic setValue:@1 forKey:USER_IsEnter]; | ||
| 207 | + [CNAudioOrVideoMananger EditDefaultWithDic:resultDic]; | ||
| 208 | + | ||
| 209 | + return; | ||
| 210 | + } | ||
| 211 | + if (isEnterRoom) { | ||
| 212 | + [dic setValue:@1 forKey:USER_InRoom]; | ||
| 213 | + }else { | ||
| 214 | + [dic setValue:@0 forKey:USER_InRoom]; | ||
| 215 | + } | ||
| 216 | + [CNAudioOrVideoMananger EditDefaultWithDic:dic]; | ||
| 217 | + | ||
| 218 | +} | ||
| 219 | + | ||
| 220 | +/*** 其他人是否进入房间 ***/ | ||
| 221 | ++ (void)IsOtherEnterRoomDic:(BOOL)isOtherEnterRoom { | ||
| 222 | + | ||
| 223 | + NSMutableDictionary *dic = (NSMutableDictionary *)[CNAudioOrVideoMananger GetDefaultDic]; | ||
| 224 | + if (dic.count <= 0) { | ||
| 225 | + [CNAudioOrVideoMananger InitializeDefault]; | ||
| 226 | + NSMutableDictionary *resultDic = (NSMutableDictionary *)[CNAudioOrVideoMananger GetDefaultDic]; | ||
| 227 | + [resultDic setValue:@1 forKey:USER_IsEnter]; | ||
| 228 | + [CNAudioOrVideoMananger EditDefaultWithDic:resultDic]; | ||
| 229 | + return; | ||
| 230 | + } | ||
| 231 | + if (isOtherEnterRoom) { | ||
| 232 | + [dic setValue:@1 forKey:USER_InOtherRoom]; | ||
| 233 | + }else { | ||
| 234 | + [dic setValue:@0 forKey:USER_InOtherRoom]; | ||
| 235 | + } | ||
| 236 | + [CNAudioOrVideoMananger EditDefaultWithDic:dic]; | ||
| 237 | + | ||
| 238 | +} | ||
| 239 | + | ||
| 240 | +/*** 音视频访问状态 ***/ | ||
| 241 | ++ (void)UserCallStatus:(NSString *)callStatus { | ||
| 242 | + | ||
| 243 | + NSMutableDictionary *dic = (NSMutableDictionary *)[CNAudioOrVideoMananger GetDefaultDic]; | ||
| 244 | + if (dic.count <= 0) { | ||
| 245 | + [CNAudioOrVideoMananger InitializeDefault]; | ||
| 246 | + NSMutableDictionary *resultDic = (NSMutableDictionary *)[CNAudioOrVideoMananger GetDefaultDic]; | ||
| 247 | + [resultDic setValue:@1 forKey:USER_IsEnter]; | ||
| 248 | + [resultDic setValue:callStatus forKey:USER_CallStatus]; | ||
| 249 | + [CNAudioOrVideoMananger EditDefaultWithDic:resultDic]; | ||
| 250 | + | ||
| 251 | + return; | ||
| 252 | + } | ||
| 253 | + [dic setValue:callStatus forKey:USER_Status]; | ||
| 254 | + [CNAudioOrVideoMananger EditDefaultWithDic:dic]; | ||
| 255 | + | ||
| 256 | +} | ||
| 257 | + | ||
| 258 | + | ||
| 259 | + | ||
| 260 | + | ||
| 261 | + | ||
| 262 | +@end |
CNAudioOrVideoMananger/Classes/CNVideoOrAudioWindow.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNVideoOrAudioWindow.h | ||
| 3 | +// CNAudioOrVideoMananger | ||
| 4 | +// | ||
| 5 | +// Created by 梁星国 on 2019/11/19. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +#import <UIKit/UIKit.h> | ||
| 9 | + | ||
| 10 | +NS_ASSUME_NONNULL_BEGIN | ||
| 11 | + | ||
| 12 | +@interface CNVideoOrAudioWindow : UIWindow | ||
| 13 | + | ||
| 14 | +@property (strong, nonatomic) UIWindow *originalKeyWindow; | ||
| 15 | + | ||
| 16 | + | ||
| 17 | + | ||
| 18 | +@end | ||
| 19 | + | ||
| 20 | +NS_ASSUME_NONNULL_END |
CNAudioOrVideoMananger/Classes/CNVideoOrAudioWindow.m
0 → 100644
CNAudioOrVideoMananger/Classes/ReplaceMe.m deleted
100644 → 0
Example/CNAudioOrVideoMananger.xcodeproj/project.pbxproj
| @@ -8,6 +8,9 @@ | @@ -8,6 +8,9 @@ | ||
| 8 | 8 | ||
| 9 | /* Begin PBXBuildFile section */ | 9 | /* Begin PBXBuildFile section */ |
| 10 | 226CFC9A5A4321BAB6B9EE24 /* Pods_CNAudioOrVideoMananger_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F9D205688F90DE8C9FBE30A /* Pods_CNAudioOrVideoMananger_Tests.framework */; }; | 10 | 226CFC9A5A4321BAB6B9EE24 /* Pods_CNAudioOrVideoMananger_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F9D205688F90DE8C9FBE30A /* Pods_CNAudioOrVideoMananger_Tests.framework */; }; |
| 11 | + 394A351E2383932600392690 /* libc++.1.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 394A351D2383932500392690 /* libc++.1.tbd */; }; | ||
| 12 | + 394A35202383932B00392690 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 394A351F2383932B00392690 /* libc++.tbd */; }; | ||
| 13 | + 394A35222383933100392690 /* libc++abi.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 394A35212383933100392690 /* libc++abi.tbd */; }; | ||
| 11 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; | 14 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; |
| 12 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; | 15 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; |
| 13 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; | 16 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; |
| @@ -37,10 +40,13 @@ | @@ -37,10 +40,13 @@ | ||
| 37 | /* End PBXContainerItemProxy section */ | 40 | /* End PBXContainerItemProxy section */ |
| 38 | 41 | ||
| 39 | /* Begin PBXFileReference section */ | 42 | /* Begin PBXFileReference section */ |
| 40 | - 12EC9C1AD2DAB7B63CA6CCEE /* CNAudioOrVideoMananger.podspec */ = {isa = PBXFileReference; includeInIndex = 1; name = CNAudioOrVideoMananger.podspec; path = ../CNAudioOrVideoMananger.podspec; sourceTree = "<group>"; }; | 43 | + 12EC9C1AD2DAB7B63CA6CCEE /* CNAudioOrVideoMananger.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNAudioOrVideoMananger.podspec; path = ../CNAudioOrVideoMananger.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; |
| 41 | 1815044F17685109381DC85C /* Pods-CNAudioOrVideoMananger_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNAudioOrVideoMananger_Tests.release.xcconfig"; path = "Target Support Files/Pods-CNAudioOrVideoMananger_Tests/Pods-CNAudioOrVideoMananger_Tests.release.xcconfig"; sourceTree = "<group>"; }; | 44 | 1815044F17685109381DC85C /* Pods-CNAudioOrVideoMananger_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNAudioOrVideoMananger_Tests.release.xcconfig"; path = "Target Support Files/Pods-CNAudioOrVideoMananger_Tests/Pods-CNAudioOrVideoMananger_Tests.release.xcconfig"; sourceTree = "<group>"; }; |
| 42 | - 26C3DF1806FE4C65E62DC532 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; }; | ||
| 43 | - 51E939C7F4DD6729FCFE0630 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; name = README.md; path = ../README.md; sourceTree = "<group>"; }; | 45 | + 26C3DF1806FE4C65E62DC532 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; }; |
| 46 | + 394A351D2383932500392690 /* libc++.1.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.1.tbd"; path = "usr/lib/libc++.1.tbd"; sourceTree = SDKROOT; }; | ||
| 47 | + 394A351F2383932B00392690 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; | ||
| 48 | + 394A35212383933100392690 /* libc++abi.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++abi.tbd"; path = "usr/lib/libc++abi.tbd"; sourceTree = SDKROOT; }; | ||
| 49 | + 51E939C7F4DD6729FCFE0630 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; }; | ||
| 44 | 542DBDEE8A1B2615747521F4 /* Pods-CNAudioOrVideoMananger_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNAudioOrVideoMananger_Example.release.xcconfig"; path = "Target Support Files/Pods-CNAudioOrVideoMananger_Example/Pods-CNAudioOrVideoMananger_Example.release.xcconfig"; sourceTree = "<group>"; }; | 50 | 542DBDEE8A1B2615747521F4 /* Pods-CNAudioOrVideoMananger_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNAudioOrVideoMananger_Example.release.xcconfig"; path = "Target Support Files/Pods-CNAudioOrVideoMananger_Example/Pods-CNAudioOrVideoMananger_Example.release.xcconfig"; sourceTree = "<group>"; }; |
| 45 | 6003F58A195388D20070C39A /* CNAudioOrVideoMananger_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNAudioOrVideoMananger_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; | 51 | 6003F58A195388D20070C39A /* CNAudioOrVideoMananger_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNAudioOrVideoMananger_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| 46 | 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; | 52 | 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; |
| @@ -74,6 +80,9 @@ | @@ -74,6 +80,9 @@ | ||
| 74 | isa = PBXFrameworksBuildPhase; | 80 | isa = PBXFrameworksBuildPhase; |
| 75 | buildActionMask = 2147483647; | 81 | buildActionMask = 2147483647; |
| 76 | files = ( | 82 | files = ( |
| 83 | + 394A35222383933100392690 /* libc++abi.tbd in Frameworks */, | ||
| 84 | + 394A35202383932B00392690 /* libc++.tbd in Frameworks */, | ||
| 85 | + 394A351E2383932600392690 /* libc++.1.tbd in Frameworks */, | ||
| 77 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, | 86 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, |
| 78 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, | 87 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, |
| 79 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, | 88 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, |
| @@ -119,6 +128,9 @@ | @@ -119,6 +128,9 @@ | ||
| 119 | 6003F58C195388D20070C39A /* Frameworks */ = { | 128 | 6003F58C195388D20070C39A /* Frameworks */ = { |
| 120 | isa = PBXGroup; | 129 | isa = PBXGroup; |
| 121 | children = ( | 130 | children = ( |
| 131 | + 394A35212383933100392690 /* libc++abi.tbd */, | ||
| 132 | + 394A351F2383932B00392690 /* libc++.tbd */, | ||
| 133 | + 394A351D2383932500392690 /* libc++.1.tbd */, | ||
| 122 | 6003F58D195388D20070C39A /* Foundation.framework */, | 134 | 6003F58D195388D20070C39A /* Foundation.framework */, |
| 123 | 6003F58F195388D20070C39A /* CoreGraphics.framework */, | 135 | 6003F58F195388D20070C39A /* CoreGraphics.framework */, |
| 124 | 6003F591195388D20070C39A /* UIKit.framework */, | 136 | 6003F591195388D20070C39A /* UIKit.framework */, |
| @@ -193,7 +205,6 @@ | @@ -193,7 +205,6 @@ | ||
| 193 | C164EE37C89C39A6AC459C03 /* Pods-CNAudioOrVideoMananger_Tests.debug.xcconfig */, | 205 | C164EE37C89C39A6AC459C03 /* Pods-CNAudioOrVideoMananger_Tests.debug.xcconfig */, |
| 194 | 1815044F17685109381DC85C /* Pods-CNAudioOrVideoMananger_Tests.release.xcconfig */, | 206 | 1815044F17685109381DC85C /* Pods-CNAudioOrVideoMananger_Tests.release.xcconfig */, |
| 195 | ); | 207 | ); |
| 196 | - name = Pods; | ||
| 197 | path = Pods; | 208 | path = Pods; |
| 198 | sourceTree = "<group>"; | 209 | sourceTree = "<group>"; |
| 199 | }; | 210 | }; |
| @@ -248,6 +259,9 @@ | @@ -248,6 +259,9 @@ | ||
| 248 | LastUpgradeCheck = 0720; | 259 | LastUpgradeCheck = 0720; |
| 249 | ORGANIZATIONNAME = jyyjkt; | 260 | ORGANIZATIONNAME = jyyjkt; |
| 250 | TargetAttributes = { | 261 | TargetAttributes = { |
| 262 | + 6003F589195388D20070C39A = { | ||
| 263 | + DevelopmentTeam = 94X49GG3ZW; | ||
| 264 | + }; | ||
| 251 | 6003F5AD195388D20070C39A = { | 265 | 6003F5AD195388D20070C39A = { |
| 252 | TestTargetID = 6003F589195388D20070C39A; | 266 | TestTargetID = 6003F589195388D20070C39A; |
| 253 | }; | 267 | }; |
| @@ -258,6 +272,7 @@ | @@ -258,6 +272,7 @@ | ||
| 258 | developmentRegion = English; | 272 | developmentRegion = English; |
| 259 | hasScannedForEncodings = 0; | 273 | hasScannedForEncodings = 0; |
| 260 | knownRegions = ( | 274 | knownRegions = ( |
| 275 | + English, | ||
| 261 | en, | 276 | en, |
| 262 | Base, | 277 | Base, |
| 263 | ); | 278 | ); |
| @@ -494,10 +509,56 @@ | @@ -494,10 +509,56 @@ | ||
| 494 | baseConfigurationReference = 7D2063244548224FDF71D80A /* Pods-CNAudioOrVideoMananger_Example.debug.xcconfig */; | 509 | baseConfigurationReference = 7D2063244548224FDF71D80A /* Pods-CNAudioOrVideoMananger_Example.debug.xcconfig */; |
| 495 | buildSettings = { | 510 | buildSettings = { |
| 496 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 511 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 512 | + DEVELOPMENT_TEAM = 94X49GG3ZW; | ||
| 513 | + ENABLE_BITCODE = NO; | ||
| 497 | GCC_PRECOMPILE_PREFIX_HEADER = YES; | 514 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
| 498 | GCC_PREFIX_HEADER = "CNAudioOrVideoMananger/CNAudioOrVideoMananger-Prefix.pch"; | 515 | GCC_PREFIX_HEADER = "CNAudioOrVideoMananger/CNAudioOrVideoMananger-Prefix.pch"; |
| 516 | + HEADER_SEARCH_PATHS = ( | ||
| 517 | + "$(inherited)", | ||
| 518 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking/AFNetworking.framework/Headers\"", | ||
| 519 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNAudioOrVideoMananger/CNAudioOrVideoMananger.framework/Headers\"", | ||
| 520 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework/Headers\"", | ||
| 521 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveBusinessTools/CNLiveBusinessTools.framework/Headers\"", | ||
| 522 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveCacheManagerKit/CNLiveCacheManagerKit.framework/Headers\"", | ||
| 523 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers\"", | ||
| 524 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework/Headers\"", | ||
| 525 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveIMBaseSDK/CNLiveIMBaseSDK.framework/Headers\"", | ||
| 526 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework/Headers\"", | ||
| 527 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework/Headers\"", | ||
| 528 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveUserManagement/CNLiveUserManagement.framework/Headers\"", | ||
| 529 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/FMDB/FMDB.framework/Headers\"", | ||
| 530 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/GPUImage/GPUImage.framework/Headers\"", | ||
| 531 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/HappyDNS/HappyDNS.framework/Headers\"", | ||
| 532 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/Ks3SDK/Ks3SDK.framework/Headers\"", | ||
| 533 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers\"", | ||
| 534 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/MJExtension/MJExtension.framework/Headers\"", | ||
| 535 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers\"", | ||
| 536 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers\"", | ||
| 537 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/PGDatePicker/PGDatePicker.framework/Headers\"", | ||
| 538 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/PGPickerView/PGPickerView.framework/Headers\"", | ||
| 539 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/QMUIKit/QMUIKit.framework/Headers\"", | ||
| 540 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/Qiniu/Qiniu.framework/Headers\"", | ||
| 541 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/RSKImageCropper/RSKImageCropper.framework/Headers\"", | ||
| 542 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/SAMKeychain/SAMKeychain.framework/Headers\"", | ||
| 543 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/SDAutoLayout/SDAutoLayout.framework/Headers\"", | ||
| 544 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/SDCycleScrollView/SDCycleScrollView.framework/Headers\"", | ||
| 545 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers\"", | ||
| 546 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/SGPagingView/SGPagingView.framework/Headers\"", | ||
| 547 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive/SSZipArchive.framework/Headers\"", | ||
| 548 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/WebViewJavascriptBridge/WebViewJavascriptBridge.framework/Headers\"", | ||
| 549 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/YYKit/YYKit.framework/Headers\"", | ||
| 550 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/libksygpulive_ks3/libksygpulive.framework/Headers\"", | ||
| 551 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios/Lottie.framework/Headers\"", | ||
| 552 | + "\"${PODS_ROOT}/Headers/Public\"", | ||
| 553 | + "\"${PODS_ROOT}/Headers/Public/WechatOpenSDK\"", | ||
| 554 | + "\"${PODS_ROOT}/Headers/Public/Weibo_SDK\"", | ||
| 555 | + "${PODS_ROOT}/TXIMSDK_iOS/ImSDK.framework/Headers/", | ||
| 556 | + "${PODS_ROOT}/TXLiteAVSDK_TRTC/TXLiteAVSDK_TRTC/TXLiteAVSDK_TRTC.framework/Headers/", | ||
| 557 | + ); | ||
| 499 | INFOPLIST_FILE = "CNAudioOrVideoMananger/CNAudioOrVideoMananger-Info.plist"; | 558 | INFOPLIST_FILE = "CNAudioOrVideoMananger/CNAudioOrVideoMananger-Info.plist"; |
| 559 | + IPHONEOS_DEPLOYMENT_TARGET = 9.3; | ||
| 500 | MODULE_NAME = ExampleApp; | 560 | MODULE_NAME = ExampleApp; |
| 561 | + ONLY_ACTIVE_ARCH = YES; | ||
| 501 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; | 562 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; |
| 502 | PRODUCT_NAME = "$(TARGET_NAME)"; | 563 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 503 | SWIFT_VERSION = 4.0; | 564 | SWIFT_VERSION = 4.0; |
| @@ -510,10 +571,56 @@ | @@ -510,10 +571,56 @@ | ||
| 510 | baseConfigurationReference = 542DBDEE8A1B2615747521F4 /* Pods-CNAudioOrVideoMananger_Example.release.xcconfig */; | 571 | baseConfigurationReference = 542DBDEE8A1B2615747521F4 /* Pods-CNAudioOrVideoMananger_Example.release.xcconfig */; |
| 511 | buildSettings = { | 572 | buildSettings = { |
| 512 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 573 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 574 | + DEVELOPMENT_TEAM = 94X49GG3ZW; | ||
| 575 | + ENABLE_BITCODE = NO; | ||
| 513 | GCC_PRECOMPILE_PREFIX_HEADER = YES; | 576 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
| 514 | GCC_PREFIX_HEADER = "CNAudioOrVideoMananger/CNAudioOrVideoMananger-Prefix.pch"; | 577 | GCC_PREFIX_HEADER = "CNAudioOrVideoMananger/CNAudioOrVideoMananger-Prefix.pch"; |
| 578 | + HEADER_SEARCH_PATHS = ( | ||
| 579 | + "$(inherited)", | ||
| 580 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking/AFNetworking.framework/Headers\"", | ||
| 581 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNAudioOrVideoMananger/CNAudioOrVideoMananger.framework/Headers\"", | ||
| 582 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework/Headers\"", | ||
| 583 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveBusinessTools/CNLiveBusinessTools.framework/Headers\"", | ||
| 584 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveCacheManagerKit/CNLiveCacheManagerKit.framework/Headers\"", | ||
| 585 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers\"", | ||
| 586 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework/Headers\"", | ||
| 587 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveIMBaseSDK/CNLiveIMBaseSDK.framework/Headers\"", | ||
| 588 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework/Headers\"", | ||
| 589 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework/Headers\"", | ||
| 590 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/CNLiveUserManagement/CNLiveUserManagement.framework/Headers\"", | ||
| 591 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/FMDB/FMDB.framework/Headers\"", | ||
| 592 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/GPUImage/GPUImage.framework/Headers\"", | ||
| 593 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/HappyDNS/HappyDNS.framework/Headers\"", | ||
| 594 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/Ks3SDK/Ks3SDK.framework/Headers\"", | ||
| 595 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers\"", | ||
| 596 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/MJExtension/MJExtension.framework/Headers\"", | ||
| 597 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers\"", | ||
| 598 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers\"", | ||
| 599 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/PGDatePicker/PGDatePicker.framework/Headers\"", | ||
| 600 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/PGPickerView/PGPickerView.framework/Headers\"", | ||
| 601 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/QMUIKit/QMUIKit.framework/Headers\"", | ||
| 602 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/Qiniu/Qiniu.framework/Headers\"", | ||
| 603 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/RSKImageCropper/RSKImageCropper.framework/Headers\"", | ||
| 604 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/SAMKeychain/SAMKeychain.framework/Headers\"", | ||
| 605 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/SDAutoLayout/SDAutoLayout.framework/Headers\"", | ||
| 606 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/SDCycleScrollView/SDCycleScrollView.framework/Headers\"", | ||
| 607 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers\"", | ||
| 608 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/SGPagingView/SGPagingView.framework/Headers\"", | ||
| 609 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive/SSZipArchive.framework/Headers\"", | ||
| 610 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/WebViewJavascriptBridge/WebViewJavascriptBridge.framework/Headers\"", | ||
| 611 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/YYKit/YYKit.framework/Headers\"", | ||
| 612 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/libksygpulive_ks3/libksygpulive.framework/Headers\"", | ||
| 613 | + "\"${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios/Lottie.framework/Headers\"", | ||
| 614 | + "\"${PODS_ROOT}/Headers/Public\"", | ||
| 615 | + "\"${PODS_ROOT}/Headers/Public/WechatOpenSDK\"", | ||
| 616 | + "\"${PODS_ROOT}/Headers/Public/Weibo_SDK\"", | ||
| 617 | + "${PODS_ROOT}/TXIMSDK_iOS/ImSDK.framework/Headers/", | ||
| 618 | + "${PODS_ROOT}/TXLiteAVSDK_TRTC/TXLiteAVSDK_TRTC/TXLiteAVSDK_TRTC.framework/Headers/", | ||
| 619 | + ); | ||
| 515 | INFOPLIST_FILE = "CNAudioOrVideoMananger/CNAudioOrVideoMananger-Info.plist"; | 620 | INFOPLIST_FILE = "CNAudioOrVideoMananger/CNAudioOrVideoMananger-Info.plist"; |
| 621 | + IPHONEOS_DEPLOYMENT_TARGET = 9.3; | ||
| 516 | MODULE_NAME = ExampleApp; | 622 | MODULE_NAME = ExampleApp; |
| 623 | + ONLY_ACTIVE_ARCH = NO; | ||
| 517 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; | 624 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; |
| 518 | PRODUCT_NAME = "$(TARGET_NAME)"; | 625 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 519 | SWIFT_VERSION = 4.0; | 626 | SWIFT_VERSION = 4.0; |
Example/Podfile
| 1 | +source 'https://github.com/CocoaPods/Specs.git' | ||
| 2 | +source 'http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git' | ||
| 3 | + | ||
| 1 | use_frameworks! | 4 | use_frameworks! |
| 2 | 5 | ||
| 3 | -platform :ios, '8.0' | 6 | +platform :ios, '9.0' |
| 4 | 7 | ||
| 5 | target 'CNAudioOrVideoMananger_Example' do | 8 | target 'CNAudioOrVideoMananger_Example' do |
| 6 | pod 'CNAudioOrVideoMananger', :path => '../' | 9 | pod 'CNAudioOrVideoMananger', :path => '../' |
| 10 | + | ||
| 11 | + #依赖三方私有库,如果里面有.a的时候加上这个 | ||
| 12 | + pre_install do |installer| Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {} | ||
| 13 | + end | ||
| 7 | 14 | ||
| 8 | target 'CNAudioOrVideoMananger_Tests' do | 15 | target 'CNAudioOrVideoMananger_Tests' do |
| 9 | inherit! :search_paths | 16 | inherit! :search_paths |
| 17 | + | ||
| 18 | + #依赖三方私有库,如果里面有.a的时候加上这个 | ||
| 19 | + pre_install do |installer| Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {} | ||
| 20 | + end | ||
| 10 | 21 | ||
| 11 | 22 | ||
| 12 | end | 23 | end |