Is there any way of discovering the name of the device when the user started to cast to it? The only thing I found was this
let route = AVAudioSession.sharedInstance().currentRoute
for output in route.outputs where output.portType == .airPlay {
infoDict["deviceName"] = output.portName
infoDict["portType"] = output.portType.rawValue
}
but the output.portName returns the portType instead of the portName.