in Swift/KVSiOSApp/ChannelConfigurationViewController.swift [202:224]
func retrieveChannelARN(channelName: String) {
if !channelName.isEmpty {
let describeInput = AWSKinesisVideoDescribeSignalingChannelInput()
describeInput?.channelName = channelName
let kvsClient = AWSKinesisVideo(forKey: awsKinesisVideoKey)
kvsClient.describeSignalingChannel(describeInput!).continueWith(block: { (task) -> Void in
if let error = task.error {
print("Error describing channel: \(error)")
} else {
self.channelARN = task.result?.channelInfo?.channelARN
print("Channel ARN : ", task.result!.channelInfo!.channelARN ?? "Channel ARN empty.")
}
}).waitUntilFinished()
} else {
let alertController = UIAlertController(title: "Channel Name is Empty",
message: "Valid Channel Name is required.",
preferredStyle: .alert)
let okAction = UIAlertAction(title: "Ok", style: .default, handler: nil)
alertController.addAction(okAction)
present(alertController, animated: true, completion: nil)
return
}
}