AgoraIO / AgoraRtcEngine_iOS

iOS Package for Agora Video RTE SDK. Perfect for video calls and live streaming.
https://agoraio.github.io/AgoraRtcEngine_iOS/
MIT License
58 stars 17 forks source link

How can I get Audio/Video call when app in background or not running mode #28

Closed GireshD closed 1 year ago

GireshD commented 2 years ago

Currently I am using Agora SDK for Audio/Video call. I am not getting call when app is not running. What I need to added to get audio/video call in background or app not running.

maxxfrazer commented 2 years ago

Hi Giresh, you'd need to implement CallKit for the notifications of incoming calls while the app is closed.

GireshD commented 2 years ago

@maxxfrazer
I tried with VOIP push notification but my app crashed when I accepted the call.

my app crashed here, showing empty lastIncomingInvitation, as I got call from VOIP push notification. guard let last = rtm.lastIncomingInvitation else { fatalError("rtm lastIncomingInvitation") }

code: func accpetLastIncomingInvitation(fail: ErrorCompletion = nil) { let rtm = AgoraRtm.shared()

    guard let last = rtm.lastIncomingInvitation else {
        fatalError("rtm lastIncomingInvitation")
    }

    accept(last) {(errorCode) in
        guard errorCode == AgoraRtmInvitationApiCallErrorCode.ok else {
            if let fail = fail {
                fail(AGEError(type: .fail("rtm refuse invitation fail: \(errorCode.rawValue)")))
            }
            return
        }
    }
}

please help me on this

plutoless commented 2 years ago

hi @GireshD i double checked and we don't have this property/api. what is rtm object instance?

maxxfrazer commented 1 year ago

Closing this due to inactivity.