logo
On this page

API

ZegoUIKitPrebuiltCallInvitationService

initWithAppID

You must call this method as soon as the user login(or re-login, auto-login) to your app.

function prototype:

Untitled
/// Initialization of call service
/// - Parameters:
///   - appID: Your appID
///   - appSign: Your appSign
///   - userID: User unique identification
///   - userName: userName
///   - config: CallInvitation personalized configuration
public func initWithAppID(_ appID: UInt32, 
                          appSign: String,
                          userID: String, 
                          userName: String, 
                          config: ZegoUIKitPrebuiltCallInvitationConfig)
1
Copied!

unInit

Should be used in pairs with the initWithAppID api.

function prototype:

Untitled
/// Deinitialize call service
public func unInit()
1
Copied!

getPrebuiltCallVC

You can access the call page controller through this interface

function prototype:

Untitled
/// Obtain the call page controller
/// - Returns: ZegoUIKitPrebuiltCallVC
public func getPrebuiltCallVC()-> ZegoUIKitPrebuiltCallVC?
1
Copied!

setRemoteNotificationsDeviceToken

If you want to use offline invitations you must call this interface to set the token of the current device

function prototype:

Untitled
/// Set the device Token to be pushed offline
/// - Parameter deviceToken: device token
public static func setRemoteNotificationsDeviceToken(_ deviceToken: Data)
1
Copied!

endCall

You can call this interface to end the current call

function prototype:

Untitled
/// End the call
public func endCall()
1
Copied!

setAudioOutputToSpeaker

You can route the audio to the speaker by calling this interface.

function prototype:

Untitled
public func setAudioOutputToSpeaker(outputToSpeaker: Bool)
1
Copied!

getAudioRouteType

You can use this interface to get the current audio route

function prototype:

Untitled
public func getAudioRouteType() -> ZegoUIKitAudioOutputDevice
1
Copied!

ZegoUIKitPrebuiltCallVC

addButtonToBottomMenuBar

You can add custom buttons to the bottom bar by calling this interface

function prototype:

Untitled
public func addButtonToBottomMenuBar(_ button: UIButton)
1
Copied!

addButtonToTopMenuBar

You can add custom buttons to the top bar by calling this interface

function prototype:

Untitled
public func addButtonToTopMenuBar(_ button: UIButton)
1
Copied!

finish

You can call this method to end the current call.

function prototype:

Untitled
public func finish()
1
Copied!

Previous

Minimize call window

Next

Event