I am using Sendbird to place 1-1 calls in my SwiftUI app. For some reason no matter what I do I can’t get the ‘didStartRinging’ delegate method to be called. I’m using two physical iPad’s to test on. The use case for this app is that it will always be in the foreground, so no need to register VoIP notifications. I am able to use SendBirdCall.dial just fine. In the dashboard it shows that the call was created correctly, with the callee and caller id’s both correct. However ‘didStartRinging’ never gets fired. I’m also making sure that the user is authenticated before setting SendBirdCall.addDelegate(self, identifier: UUID().uuidString)
I’ve also made sure that the class that’s in is only initialized once. Here is what that class looks like
class SendbirdCallsManager: SendBirdCallDelegate {
static let shared = SendbirdCallsManager()
@Published private(set) var incomingCallsByCallID: [String: DirectCall] = [:]
init() {
SendBirdCall.addDelegate(self, identifier: UUID().uuidString)
}
func didStartRinging(_ call: DirectCall) {
self.incomingCallsByCallID[call.callId] = call
}
func lookupCall(for callID: String) -> DirectCall? {
return incomingCallsByCallID[callID]
}
func removeCall(for callID: String) {
incomingCallsByCallID.removeValue(forKey: callID)
}
}
Any help would be appreciated because this has been a headache.