Post

Replies

Boosts

Views

Activity

Reply to Tell me about Swift and Callkit
Thank you very much. I am creating a video call using SkyWay in SwiftUI, and I plan to use Callkit to make and receive calls, but I cannot switch the screen view properly. Here is an excerpt of the source code I want to activate vidioView.swift, is there any good way to do this? vidioView.swift func setupPeerCallBacks(peer:SKWPeer) {         peer.on(SKWPeerEventEnum.PEER_EVENT_CONNECTION) { obj in             if let connection = obj as? SKWDataConnection{                 if self.dataConnection == nil {                     self.callCenter.IncomingCall(true)                 }                 self.dataConnection = connection                 self.setupDataConnectionCallbacks(dataConnection: connection)             }         } } callcenter.swift     func IncomingCall(_ hasVideo: Bool = false) {         uuid = UUID()         let update = CXCallUpdate()         update.remoteHandle = CXHandle(type: .generic, value: CallName)         update.hasVideo = hasVideo         provider.reportNewIncomingCall(with: uuid, update: update) { error in             if let error = error {                 print("reportNewIncomingCall error: \(error.localizedDescription)")             }         }     }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’21
Reply to Tell me about Swift and Callkit
Thank you very much. I am creating a video call using SkyWay in SwiftUI, and I plan to use Callkit to make and receive calls, but I cannot switch the screen view properly. Here is an excerpt of the source code I want to activate vidioView.swift, is there any good way to do this? vidioView.swift func setupPeerCallBacks(peer:SKWPeer) {         peer.on(SKWPeerEventEnum.PEER_EVENT_CONNECTION) { obj in             if let connection = obj as? SKWDataConnection{                 if self.dataConnection == nil {                     self.callCenter.IncomingCall(true)                 }                 self.dataConnection = connection                 self.setupDataConnectionCallbacks(dataConnection: connection)             }         } } callcenter.swift     func IncomingCall(_ hasVideo: Bool = false) {         uuid = UUID()         let update = CXCallUpdate()         update.remoteHandle = CXHandle(type: .generic, value: CallName)         update.hasVideo = hasVideo         provider.reportNewIncomingCall(with: uuid, update: update) { error in             if let error = error {                 print("reportNewIncomingCall error: \(error.localizedDescription)")             }         }     }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21