Can we use Callkit for Apps with WebRTC

We have a iOS app in which we have integrated video calling using WebRTC sdk. Now we would like to use the Call Kit https://developer.apple.com/documentation/callkitin the app to display the call UI. When i am chekcing in docuemntation of the call kit it says that it can be used for voip app. Therefore we would like to know if as per the apple developer guidelines is it allowed to use the call kit features in a app providing voice and video calling using webrtc.

CallKit integration

Disclaimer: I am not sure if this is the best way doing it but this has worked for me so far:

  1. Configure WebRTC audio session to use manual audio and disable audio:
    1. RTCAudioSession.sharedInstance().useManualAudio = true
    2. RTCAudioSession.sharedInstance().isAudioEnabled = false
  2. On your CXProvider delegate's provider(CXProvider, didActivate: AVAudioSession) method:
    1. Call RTCAudioSession.sharedInstance().audioSessionDidActivate with the AVAudioSession from the CXProvider
    2. Enable audio: RTCAudioSession.sharedInstance().isAudioEnabled = true
  3. On your CXProvider delegate's provider(CXProvider, didDeactivate: AVAudioSession) call RTCAudioSession.sharedInstance().audioSessionDidDeactivate with the AVAudioSession from the CXProvider

WebRTC and CallKit talk from 2016: https://youtu.be/JB2MdcY1MKs?t=6m23s

credit to stasel from WebRTC-iOS

Can we use Callkit for Apps with WebRTC
 
 
Q