Skip to content

Commit

Permalink
Release RongCloud CallKit SDK 2.8.14
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins committed Jul 19, 2017
1 parent 172301b commit 1374aa3
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 4 deletions.
22 changes: 20 additions & 2 deletions ios-rongcallkit/RongCallKit/Controller/RCCallBaseViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@
#import "RCCallKitUtility.h"
#import "RCloudImageView.h"
#import <AVFoundation/AVFoundation.h>
#import <CoreTelephony/CTCallCenter.h>
#import <CoreTelephony/CTCall.h>

@interface RCCallBaseViewController ()

@property(nonatomic, strong) NSTimer *activeTimer;
@property(nonatomic, strong) AVAudioPlayer *audioPlayer;
@property(nonatomic, assign) BOOL needPlayingAlertAfterForeground;
@property(nonatomic, assign) BOOL needPlayingRingAfterForeground;
@property(nonatomic, strong) CTCallCenter *callCenter;

@end

Expand Down Expand Up @@ -140,6 +143,8 @@ - (void)viewDidLoad {
selector:@selector(onOrientationChanged:)
name:UIApplicationDidChangeStatusBarOrientationNotification
object:nil];

[self registerTelephonyEvent];

// UIVisualEffect *blurEffect = [UIBlurEffect
// effectWithStyle:UIBlurEffectStyleDark];
Expand All @@ -156,7 +161,7 @@ - (void)onOrientationChanged:(NSNotification *)notification {
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];

if (self.callSession.callStatus == RCCallActive) {
[self updateActiveTimer];
[self startActiveTimer];
Expand All @@ -165,6 +170,7 @@ - (void)viewWillAppear:(BOOL)animated {
@"VoIPCallWaitingForRemoteAccept", @"RongCloudKit", nil);
} else if (self.callSession.callStatus == RCCallIncoming ||
self.callSession.callStatus == RCCallRinging) {
[self shouldRingForIncomingCall];
if (self.callSession.mediaType == RCCallMediaAudio) {
self.tipsLabel.text = NSLocalizedStringFromTable(@"VoIPAudioCallIncoming",
@"RongCloudKit", nil);
Expand Down Expand Up @@ -208,11 +214,12 @@ - (UIButton *)minimizeButton {
- (void)minimizeButtonClicked {
[self didTapMinimizeButton];

Class selfClass = [self class];
[RCCallFloatingBoard
startCallFloatingBoard:self.callSession
withTouchedBlock:^(RCCallSession *callSession) {
[[RCCall sharedRCCall]
presentCallViewController:[[[self class] alloc] initWithActiveCall:callSession]];
presentCallViewController:[[selfClass alloc] initWithActiveCall:callSession]];
}];
[self stopActiveTimer];
[[RCCall sharedRCCall] dismissCallViewController:self];
Expand Down Expand Up @@ -1286,6 +1293,17 @@ - (void)networkTxQuality:(RCCallQuality)txQuality rxQuality:(RCCallQuality)rxQua
// NSLog(@"networkTxQuality, %d, %d", txQuality, rxQuality);
}

#pragma mark - telephony
- (void)registerTelephonyEvent {
self.callCenter = [[CTCallCenter alloc] init];
__weak __typeof(self) weakSelf = self;
self.callCenter.callEventHandler = ^(CTCall *call) {
if ([call.callState isEqualToString:CTCallStateConnected]) {
[weakSelf.callSession hangup];
}
};
}

#pragma mark - outside callback
- (void)callWillConnect {
}
Expand Down
2 changes: 1 addition & 1 deletion ios-rongcallkit/RongCallKit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.8.13</string>
<string>2.8.14</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
14 changes: 14 additions & 0 deletions ios-rongcallkit/RongCallKit/Utility/RCCallFloatingBoard.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
#import "RCCallFloatingBoard.h"
#import "RCCallKitUtility.h"
#import <UIKit/UIKit.h>
#import <CoreTelephony/CTCallCenter.h>
#import <CoreTelephony/CTCall.h>

@interface RCCallFloatingBoard () <RCCallSessionDelegate>

@property(nonatomic, strong) NSTimer *activeTimer;
@property(nonatomic, copy) void (^touchedBlock)(RCCallSession *callSession);
@property(nonatomic, strong) CTCallCenter *callCenter;

@end

Expand Down Expand Up @@ -49,13 +52,24 @@ - (void)initBoard {
[self updateActiveTimer];
[self startActiveTimer];
[self updateBoard];
[self registerTelephonyEvent];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(onOrientationChanged:)
name:UIApplicationDidChangeStatusBarOrientationNotification
object:nil];
}

- (void)registerTelephonyEvent {
self.callCenter = [[CTCallCenter alloc] init];
__weak __typeof(self) weakSelf = self;
self.callCenter.callEventHandler = ^(CTCall *call) {
if ([call.callState isEqualToString:CTCallStateConnected]) {
[weakSelf.callSession hangup];
}
};
}

- (void)onOrientationChanged:(NSNotification *)notification {
[self updateBoard];
}
Expand Down
Binary file modified ios-rongcallkit/framework/RongCallLib.framework/Info.plist
Binary file not shown.
Binary file modified ios-rongcallkit/framework/RongCallLib.framework/RongCallLib
Binary file not shown.
Binary file modified ios-rongcallkit/framework/RongIMKit.framework/Info.plist
Binary file not shown.
Binary file modified ios-rongcallkit/framework/RongIMKit.framework/RongIMKit
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

@property(nonatomic) int userTipTime;
@property(nonatomic, strong) NSString *userTipWord;

/*!
* 评价时机
*/
Expand Down
Loading

0 comments on commit 1374aa3

Please sign in to comment.