Skip to content

Commit

Permalink
3.9.2 release (#64)
Browse files Browse the repository at this point in the history
* 3.9.2 release

* updated version

* updated pod version 3.9.2
  • Loading branch information
rsarika authored Aug 11, 2023
1 parent 305448b commit 7d15120
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 50 deletions.
18 changes: 9 additions & 9 deletions KitchenSink.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@
9DDC82DC24AA36A300F06E31 /* ContactTableViewCell.swift in Sources */,
1FDC6E2B298159B10054EC1B /* UIApplication+Extenstion.swift in Sources */,
90F9B00B24B79FB200447A9D /* TeamsViewController.swift in Sources */,
9CB90C0824E72685009D9D75 /* BuildFile in Sources */,
9CB90C0824E72685009D9D75 /* (null) in Sources */,
9C6DE77924F46B610055D500 /* SpaceMembershipViewController.swift in Sources */,
9D3701A924ABDD43004E480E /* ImageExtension.swift in Sources */,
4F326C8928EB073100EA57D9 /* PasswordCaptchaView.swift in Sources */,
Expand Down Expand Up @@ -1289,7 +1289,7 @@
CODE_SIGN_ENTITLEMENTS = KitchenSinkBroadcastExtension/KitchenSinkBroadcastExtension.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3910;
CURRENT_PROJECT_VERSION = 3920;
DEVELOPMENT_TEAM = 9X38D433RE;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -1310,7 +1310,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.9.1;
MARKETING_VERSION = 3.9.2;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.webex.sdk.KitchenSinkv3.0.KitchenSinkBroadcastExtension;
Expand Down Expand Up @@ -1344,7 +1344,7 @@
CODE_SIGN_ENTITLEMENTS = KitchenSinkBroadcastExtension/KitchenSinkBroadcastExtension.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3910;
CURRENT_PROJECT_VERSION = 3920;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 9X38D433RE;
ENABLE_BITCODE = NO;
Expand All @@ -1362,7 +1362,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.9.1;
MARKETING_VERSION = 3.9.2;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.webex.sdk.KitchenSinkv3.0.KitchenSinkBroadcastExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1398,7 +1398,7 @@
CODE_SIGN_ENTITLEMENTS = KitchenSink/KitchenSink.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3910;
CURRENT_PROJECT_VERSION = 3920;
DEVELOPMENT_TEAM = 9X38D433RE;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -1420,7 +1420,7 @@
"@executable_path/Frameworks",
executable_path/Frameworks,
);
MARKETING_VERSION = 3.9.1;
MARKETING_VERSION = 3.9.2;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.webex.sdk.KitchenSinkv3.0;
Expand Down Expand Up @@ -1456,7 +1456,7 @@
CODE_SIGN_ENTITLEMENTS = KitchenSink/KitchenSink.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3910;
CURRENT_PROJECT_VERSION = 3920;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 9X38D433RE;
ENABLE_BITCODE = NO;
Expand All @@ -1475,7 +1475,7 @@
"@executable_path/Frameworks",
executable_path/Frameworks,
);
MARKETING_VERSION = 3.9.1;
MARKETING_VERSION = 3.9.2;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.webex.sdk.KitchenSinkv3.0;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
99 changes: 67 additions & 32 deletions KitchenSink/Controllers/CallViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@ class CallViewController: UIViewController, MultiStreamObserver, UICollectionVie
private var duration = 0
private var timer = Timer()
private var shareConfig: ShareConfig? // to store share config locally and send when screen-share extension connected

private var isPhoneNumber = false
// MARK: Initializers
init(space: Space, addedCall: Bool = false, currentCallId: String = "", oldCallId: String = "", incomingCall: Bool = false, call: Call? = nil) {
init(space: Space, addedCall: Bool = false, currentCallId: String = "", oldCallId: String = "", incomingCall: Bool = false, call: Call? = nil, isPhoneNumber: Bool = false) {
self.space = space
self.addedCall = addedCall
self.currentCallId = currentCallId
self.oldCallId = oldCallId
self.incomingCall = incomingCall
self.isPhoneNumber = isPhoneNumber
if incomingCall || addedCall {
self.call = call
}
Expand All @@ -73,11 +74,12 @@ class CallViewController: UIViewController, MultiStreamObserver, UICollectionVie
modalTransitionStyle = .crossDissolve
}

init(callInviteAddress: String) {
init(callInviteAddress: String, isPhoneNumber: Bool = false) {
super.init(nibName: nil, bundle: nil)
modalPresentationStyle = .fullScreen
modalTransitionStyle = .crossDissolve
self.callInviteAddress = callInviteAddress
self.isPhoneNumber = isPhoneNumber
}

required init?(coder: NSCoder) {
Expand Down Expand Up @@ -532,6 +534,35 @@ class CallViewController: UIViewController, MultiStreamObserver, UICollectionVie
}
}

fileprivate func handleDialResult(_ result: Result<Call>) {
switch result {
case .success(let call):
self.currentCallId = call.callId
DispatchQueue.main.async {
self.webexCallStatesProcess(call: call)
}
if call.isWebexCallingOrWebexForBroadworks {
AppDelegate.shared.callKitManager?.startCall(call: call)
}
self.call = call
self.isCUCMOrWxcCall = call.isCUCMCall || call.isWebexCallingOrWebexForBroadworks
CallObjectStorage.self.shared.addCallObject(call: call)
case .failure(let error):
guard let err = error as? WebexError else {
let alert = UIAlertController(title: "Call Failed", message: "\(error)", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: {_ in
print("CallVC dismiss connectCall")
self.dismiss(animated: true)
}))
DispatchQueue.main.async {
self.present(alert, animated: true)
}
return
}
self.showErrorAlert(error: err)
}
}

private func connectCall() {
guard let joinAddress = callInviteAddress ?? space?.id else {
let alert = UIAlertController(title: "Error", message: "Calling address is null", preferredStyle: .alert)
Expand All @@ -540,34 +571,18 @@ class CallViewController: UIViewController, MultiStreamObserver, UICollectionVie
return
}
let mediaOption = getMediaOption(isModerator: isModerator, pin: pinOrPassword, captchaId: captcha?.id ?? "", captchaVerifyCode: captchaVerifyCode)
webex.phone.dial(joinAddress, option: mediaOption, completionHandler: { result in
switch result {
case .success(let call):
self.currentCallId = call.callId
DispatchQueue.main.async {
self.webexCallStatesProcess(call: call)
}
if call.isWebexCallingOrWebexForBroadworks {
AppDelegate.shared.callKitManager?.startCall(call: call)
}
self.call = call
self.isCUCMOrWxcCall = call.isCUCMCall || call.isWebexCallingOrWebexForBroadworks
CallObjectStorage.self.shared.addCallObject(call: call)
case .failure(let error):
guard let err = error as? WebexError else {
let alert = UIAlertController(title: "Call Failed", message: "\(error)", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: {_ in
print("CallVC dismiss connectCall")
self.dismiss(animated: true)
}))
DispatchQueue.main.async {
self.present(alert, animated: true)
}
return
}
self.showPasswordCaptchaAlert(error: err)
}
})

if self.isPhoneNumber
{
webex.phone.dialPhoneNumber(joinAddress, option: mediaOption, completionHandler: { result in
self.handleDialResult(result)
})

} else {
webex.phone.dial(joinAddress, option: mediaOption, completionHandler: { result in
self.handleDialResult(result)
})
}
}

private func answerCall() {
Expand Down Expand Up @@ -2300,7 +2315,7 @@ extension CallViewController: PasswordCaptchaViewViewDelegate { // captcha
self.captcha = captcha
}

func showPasswordCaptchaAlert(error: WebexError) {
func showErrorAlert(error: WebexError) {

DispatchQueue.main.async {
let captchaView = PasswordCaptchaView(frame: CGRect(x: 0, y: 120, width: 270, height: 220))
Expand Down Expand Up @@ -2328,6 +2343,26 @@ extension CallViewController: PasswordCaptchaViewViewDelegate { // captcha
title = "Invalid Password With Captcha"
message = "Please enter the captcha shown in image or by playing audio"
captchaView.setupViewForPasswordAndCaptcha()
case .requireH264:
let alert = UIAlertController(title: "Call Failed", message: "\(error)", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: {_ in
print("CallVC dismiss connectCall")
self.dismiss(animated: true)
}))
DispatchQueue.main.async {
self.present(alert, animated: true)
}
return
case .failed(reason: let reason):
let alert = UIAlertController(title: "Call Failed", message: "\(reason)", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: {_ in
print("CallVC dismiss connectCall")
self.dismiss(animated: true)
}))
DispatchQueue.main.async {
self.present(alert, animated: true)
}
return
default:
self.captcha = nil
return
Expand Down
2 changes: 1 addition & 1 deletion KitchenSink/Controllers/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class HomeViewController: UIViewController, UICollectionViewDataSource, UICollec
label.accessibilityIdentifier = "versionLabel"
label.adjustsFontSizeToFitWidth = true
label.font = .boldSystemFont(ofSize: 20)
label.textColor = .white
label.textColor = .labelColor
return label
}()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class DialCallViewController: UIViewController, DialPadViewDelegate, UITextField
var addedCall: Bool
var oldCallId: String?
var call: Call?
var isPhoneNumber = false
private var callButtonDialpadBottomConstraint: NSLayoutConstraint?
private var callButtonTextFieldBottomConstraint: NSLayoutConstraint?

Expand Down Expand Up @@ -74,6 +75,27 @@ class DialCallViewController: UIViewController, DialPadViewDelegate, UITextField
return textField
}()

private lazy var dialPhoneNumberSwitch: UISwitch = {
let toggle = UISwitch(frame: .zero)
toggle.isOn = false
toggle.setHeight(30)
toggle.onTintColor = .momentumBlue50
toggle.addTarget(self, action: #selector(dialPhoneNumberValueDidChanged(_:)), for: .valueChanged)
toggle.translatesAutoresizingMaskIntoConstraints = false
return toggle
}()

private lazy var dialPhoneNumberLabel: UILabel = {
let label = UILabel(frame: .zero)
label.translatesAutoresizingMaskIntoConstraints = false
label.font = .preferredFont(forTextStyle: .title1)
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
label.text = "Dial Phone number ?"
label.accessibilityIdentifier = "dialPhoneNumberLabel"
return label
}()

private lazy var callButton: CallButton = {
let button = CallButton(style: .cta, size: .medium, type: .connectCall)
button.translatesAutoresizingMaskIntoConstraints = false
Expand All @@ -82,6 +104,10 @@ class DialCallViewController: UIViewController, DialPadViewDelegate, UITextField
return button
}()

@objc func dialPhoneNumberValueDidChanged(_ sender: UISwitch) {
self.isPhoneNumber = sender.isOn
}

// MARK: DialPad Delegates
func dialPadView(_ dialPadView: DialPadView, didSelect key: String) {
let currentText = textField.text ?? ""
Expand Down Expand Up @@ -115,9 +141,17 @@ class DialCallViewController: UIViewController, DialPadViewDelegate, UITextField
view.addSubview(keyboardToggleButton)
view.addSubview(dialPad)
view.addSubview(callButton)
view.addSubview(dialPhoneNumberSwitch)
view.addSubview(dialPhoneNumberLabel)
}

private func setupConstraints() {
dialPhoneNumberLabel.leadingAnchor.constraint(equalTo: view.readableContentGuide.leadingAnchor, constant: 24).activate()
dialPhoneNumberLabel.bottomAnchor.constraint(equalTo: textField.topAnchor, constant: -8).activate()

dialPhoneNumberSwitch.leadingAnchor.constraint(equalTo: dialPhoneNumberLabel.trailingAnchor, constant: 16).activate()
dialPhoneNumberSwitch.bottomAnchor.constraint(equalTo: textField.topAnchor, constant: -8).activate()

textField.leadingAnchor.constraint(equalTo: view.readableContentGuide.leadingAnchor, constant: 24).activate()
textField.trailingAnchor.constraint(equalTo: view.readableContentGuide.trailingAnchor, constant: -64).activate()
textField.bottomAnchor.constraint(equalTo: dialPad.topAnchor, constant: -68).activate()
Expand Down Expand Up @@ -180,7 +214,7 @@ class DialCallViewController: UIViewController, DialPadViewDelegate, UITextField
}
})
} else {
present(CallViewController(space: space, addedCall: addedCall), animated: true)
present(CallViewController(space: space, addedCall: addedCall, isPhoneNumber: isPhoneNumber), animated: true)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class HistoryCallViewController: UIViewController, UITableViewDataSource {

// MARK: Methods
private func redialCallHistoryRecord(_ callHistoryRecord: CallHistoryRecord) {
present(CallViewController(callInviteAddress: callHistoryRecord.callbackAddress), animated: true)
present(CallViewController(callInviteAddress: callHistoryRecord.callbackAddress, isPhoneNumber: callHistoryRecord.isPhoneNumber), animated: true)
}

private func setupViews() {
Expand Down
2 changes: 1 addition & 1 deletion KitchenSink/Controllers/LoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class LoginViewController: UIViewController {
label.accessibilityIdentifier = "versionLabel"
label.adjustsFontSizeToFitWidth = true
label.font = .boldSystemFont(ofSize: 20)
label.textColor = .white
label.textColor = .labelColor
return label
}()

Expand Down
2 changes: 1 addition & 1 deletion KitchenSink/Views/ScreenShareConfigView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class ScreenShareConfigView: UIView, UIPickerViewDataSource, UIPickerViewDelegat
// MARK: - UIPickerViewDelegate

func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView {
let label = UILabel(frame: CGRect(x: 0, y: 0, width: 400, height: 44));
let label = UILabel(frame: CGRectMake(0, 0, 400, 44));
label.lineBreakMode = .byWordWrapping;
label.numberOfLines = 0;
label.text = optionList[row]
Expand Down
8 changes: 4 additions & 4 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ target 'KitchenSink' do
use_frameworks!

# Pods for KitchenSink
pod 'WebexSDK','~> 3.9.1'
# pod 'WebexSDK/Meeting','~> 3.9.1' # Uncomment this line and comment the above line for Meeting-only SDK
# pod 'WebexSDK/Wxc','~> 3.9.1' # Uncomment this line and comment the above line for Calling-only SDK
pod 'WebexSDK','~> 3.9.2'
# pod 'WebexSDK/Meeting','~> 3.9.2' # Uncomment this line and comment the above line for Meeting-only SDK
# pod 'WebexSDK/Wxc','~> 3.9.2' # Uncomment this line and comment the above line for Calling-only SDK


target 'KitchenSinkUITests' do
Expand All @@ -24,6 +24,6 @@ target 'KitchenSinkBroadcastExtension' do
use_frameworks!

# Pods for KitchenSinkBroadcastExtension
pod 'WebexBroadcastExtensionKit','~> 3.9.1'
pod 'WebexBroadcastExtensionKit','~> 3.9.2'

end

0 comments on commit 7d15120

Please sign in to comment.