ApiRTC iOS SDK Documentation

Class User​Agent

open class UserAgent  

The UserAgent serves as the base to use apiRTC. A user can be authenticated or not. For an Apizee cloud user UserAgentOptions.uri is UserAgentURI.apizee(_:) . User can be anonymous if it's a client of an Apizee enterprise and use UserAgentURI.apzkey(_:) as uri. Once registered Session object can be used to communicate with other contacts using the platform on the same API key and CCS server

Initializers

init(_:​)

public init(_ options: UserAgentOptions)  

Properties

username

open var username: String?  

photo​Url

open var photoUrl: String?  

Methods

register(register​Information:​completion:​)

open func register(registerInformation: RegisterInformation? = nil, completion: @escaping ( _ error: Error?, _ session: Session?) -> Void)  

Registers user on the server. If UserAgentURI.apizee(_:) is used, a password has to be specified in the RegisterInformation

unregister(options:​completion:​)

open func unregister(options: DisconnectOptions? = nil, completion: @escaping (_ error: Error?) -> Void)  

Unregisters and disconnects current Session

get​Current​Session()

open func getCurrentSession() -> Session?  

Returns connected Session for this UserAgent

set​User​Data(_:​)

open func setUserData(_ userData: [String: Any])  

Sets user data and updates it on the server

get​Whiteboard​Client()

open func getWhiteboardClient() -> WhiteboardClient?  

Returns current whiteboard client

get​Enterprise()

open func getEnterprise() -> Enterprise?  

Returns Enterprise (if user is registered using UserAgentURI.apizee(_:))

is​Registered()

open func isRegistered() -> Bool  

Checks whether user is registered