Tell me about Swift and Callkit

It is developed using CallKit. I want to open a specific page when a phone call is received in the foreground or background.

Please tell me how to direct a specific page.

To detect incoming call, add a CXCallObserver

https://stackoverflow.com/questions/23535355/how-to-detect-call-incoming-programmatically

If that does not answer, please explain and show the code you have so far.

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)")
            }
        }
    }
Tell me about Swift and Callkit
 
 
Q