I'm working on porting the source of an app I took from a sample to an app I created by myself by changing it to SwiftUI.
I don't know how to port the following CXProviderDelegate.
If I port it as is
If I port it as-is, I get an error saying that the non-class type 'VideoView' cannot conform to class protocol 'CXProviderDelegate'.
Please let me know how to port it.
extension videoTabView: CXProviderDelegate {
func providerDidReset(_ provider: CXProvider) {
}
func provider(_ provider: CXProvider, perform action: CXStartCallAction) {
callCenter.ConfigureAudioSession()
callCenter.Connecting()
action.fulfill()
}
func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {
callCenter.ConfigureAudioSession()
if let peer = self.dataConnection?.peer {
self.call(targetPeerId: peer)
}
action.fulfill()
}
func provider(_ provider: CXProvider, perform action: CXEndCallAction) {
self.dataConnection?.close()
self.mediaConnection?.close()
action.fulfill()
}
}
3
0
1k