UserAgent
open class UserAgent
The UserAgent serves as the base to use apiRTC.
A user agent can be authenticated or not.
For an ApiRTC cloud platform user UserAgentOptions.uri is prefixed with UserAgentURI.apirtc(_:).
User can be anonymous if it’s a client of an ApiRTC cloud platform enterprise, use prefix UserAgentURI.apiKey(_:) 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
-
Declaration
Swift
public init(_ options: UserAgentOptions) -
Register user on the server. If the URI is prefixed with
UserAgentURI.apirtc(_:)then password has to be specified in theRegisterInformationDeclaration
Swift
open func register(registerInformation: RegisterInformation? = nil, completion: @escaping (_ error: Error?, _ session: Session?) -> Void) -
Unregisters and disconnects current session
Declaration
Swift
open func unregister(options: DisconnectOptions? = nil, completion: @escaping (_ error: Error?) -> Void) -
Undocumented
Declaration
Swift
open func getUsername() -> String? -
Undocumented
Declaration
Swift
open func getPhotoUrl() -> String? -
Undocumented
Declaration
Swift
open func getUserData() -> [String : Any?] -
Sets user data and updates it on the server
Declaration
Swift
open func setUserData(_ userData: [String : Any?]) -
Declaration
Swift
open func getEnterprise() -> Enterprise?Return Value
Actual
Enterprise -
Checks whether user is registered
Declaration
Swift
open func isRegistered() -> Bool
Install in Dash
UserAgent Class Reference