Webex

@objc
public class Webex : NSObject
extension Webex: OmniusServiceBridgeDelegate

Webex object is the entry point to use this Cisco Webex iOS SDK. A Webex object must be created with one of the following Authenticator.

  • OAuthAuthenticator - this should be used when the SDK is to be authenticated as a registered user to Cisco Webex cloud.
   let clientId = "Def123456..."
   let clientSecret = "fed456..."
   let scope = "spark:all" // This can be a space separated list of scopes that your access token should posses. It should always contain `spark:all`. Please contact support if you want to add new scopes to your app.
   let redirectUri = "MyCustomApplication://response"
   let emailId = "user@example.com"
   let authenticator = OAuthAuthenticator(clientId: clientId, clientSecret: clientSecret, scope: scope, redirectUri: redirectUri, emailId: emailId)
   let webex = Webex(authenticator: authenticator)
   webex = Webex(authenticator: authenticator)
   webex.initialize { isLoggedIn in
        if !isLoggedIn {
            authenticator.authorize(parentViewController: self) { result in
                if result == .success {
                    print("user is logged in")
                }
            }
        }
    }
  • JWTAuthenticator - This should be used when the SDK is to be authenticated as a guest user to Cisco Webex cloud.
   let authenticator = JWTAuthenticator()
   let webex = Webex(authenticator: authenticator)
   webex.initialize { isLoggedIn in
        if !isLoggedIn {
            authenticator.authorizedWith(jwt: myJwt) { result in
                if result == .success {
                    print("Guest user is logged in")
                }
            }
        }
   }

Attention

All APIs on Cisco Webex iOS SDK are expected to run on the application’s main thread, unless specified otherwise.

Since

1.2.0
  • Undocumented

    Declaration

    Swift

    public let omnius: OmniusServiceBridgeProtocol
  • Undocumented

    Declaration

    Swift

    public var authenticator: Authenticator?
  • Undocumented

    Declaration

    Swift

    public weak var ucLoginDelegate: WebexUCLoginDelegate?
  • The version number of this Cisco Webex iOS SDK.

    Since

    1.2.0

    Declaration

    Swift

    public static let version: String
  • Spaces are virtual meeting places in Cisco Webex where people post messages and collaborate to get work done. Use spaces to manage the spaces on behalf of the authenticated user.

    Since

    1.2.0

    See

    Memberships API about how to manage people in a space.

    See

    Messages API about how post or otherwise manage the content in a space.

    Declaration

    Swift

    public let spaces: SpaceClient
  • Teams are groups of people with a set of spaces that are visible to all members of that team. Use teams to create and manage the teams on behalf of the authenticated user.

    Since

    1.2.0

    See

    Team Memberships API about how to manage people in a team.

    See

    Memberships API about how to manage people in a space.

    Declaration

    Swift

    public let teams: TeamClient
  • MessageClient represent activities relates to the user. Use messages to create and manage the activities on behalf of the authenticated user.

    Since

    1.4.0

    Declaration

    Swift

    public let messages: MessageClient
  • Memberships represent a person’s relationships to spaces. Use membership to manage the authenticated user’s relationship to spaces.

    Since

    1.2.0

    See

    Spaces API about how to manage spaces.

    See

    Messages API about how post or otherwise manage the content in a space.

    Declaration

    Swift

    public let memberships: MembershipClient
  • People are registered users of Cisco Webex. Use people to find a person on behalf of the authenticated user.

    Since

    1.2.0

    See

    Memberships API about how to manage people in a space.

    See

    Messages API about how post or otherwise manage the content in a space.

    Declaration

    Swift

    public let people: PersonClient
  • phone represents a calling device in Cisco Webex iOS SDK. It can be used to make audio and video calls on Cisco Webex.

    Since

    1.2.0

    Declaration

    Swift

    public let phone: Phone
  • Team Memberships represent a person’s relationships to teams. Use teamMemberships to create and manage the team membership on behalf of the authenticated user.

    Since

    1.2.0

    See

    Teams API about how to manage teams.

    See

    Spaces API about how to manage spaces.

    Declaration

    Swift

    public let teamMemberships: TeamMembershipClient
  • Webhooks allow the application to be notified via HTTP (or HTTPS?) when a specific event occurs in Cisco Webex, e.g. a new message is posted into a specific space. Use Webhooks to create and manage the webhooks for specific events.

    Since

    1.2.0

    Declaration

    Swift

    public let webhooks: WebhookClient
  • Set the log level of the logging.

    Since

    3.0.0

    Declaration

    Swift

    public var logLevel: LogLevel { get set }
  • Enables console logging

    Since

    3.0.0

    Declaration

    Swift

    public var enableConsoleLogger: Bool { get set }
  • Constructs a new Webex object with an Authenticator.

    Since

    1.2.0

    Declaration

    Swift

    public init(authenticator: Authenticator)

    Parameters

    authenticator

    The authentication strategy for this SDK.

  • Initializes the WebexSDK. This method should be called before invoking any other API

    Since

    3.0.0

    Declaration

    Swift

    public func initialize(completionHandler: @escaping ((_ success: Bool) -> Void))

    Parameters

    completionHandler

    A completion handler that returns a boolean denoting if the user is already logged in

  • Zips and returns a File URL of Webex logs

    Since

    3.0.0

    Declaration

    Swift

    public func getLogFileUrl() -> URL?

    Return Value

    A File URL containing webex log files as a zip

  • Sets the CUCM server URL and serverUrl through which CUCM call will placed

    Since

    3.0.0

    Declaration

    Swift

    public func setUCDomainServerUrl(ucDomain: String, serverUrl: String)

    Parameters

    ucDomain

    the domain for CUCM

    serverUrl

    the serverUrl for CUCM

  • Setting a CUCM credentials in required to authenticate while doing non SSO login.

    Since

    3.0.0

    Declaration

    Swift

    public func setCUCMCredential(username: String, password: String)

    Parameters

    username

    A username for Non SSO login

    password

    A password for Non SSO login

  • Opens web view for SSO authentication for CUCM login

    Since

    3.0.0

    Declaration

    Swift

    public func getUCSSOLoginView(parentViewController: UIViewController, ssoUrl: String, completionHandler: @escaping (_ success: Bool?) -> Void)

    Parameters

    parentViewController

    View controller on which the web view is presented

    ssoUrl

    The SSO url which is loaded in the web view

    Return Value

    Web view for SSO authentication of CUCM

  • Cancels currents SSO authentication for CUCM login

    Since

    3.0.0

    Declaration

    Swift

    public func ucCancelSSOLogin()
  • Returns true if user already logged on CUCM server, false otherwise

    Since

    3.0.0

    Declaration

    Swift

    public func isUCLoggedIn() -> Bool
  • Get the CUCM server connection status.

    Since

    3.0.0

    Declaration

    Swift

    public func getUCServerConnectionStatus() -> UCLoginServerConnectionStatus

    Return Value

    Server Connection status enum value will be returned [CHUCLoginServerConnectionStatus]

  • Encode UUID into base64 string

    Since

    3.0.0

    Declaration

    Swift

    public func base64Encode(resourceType: ResourceType, resource: String, completionHandler: @escaping (Result<String>) -> Void)

    Parameters

    resourceType

    Resource type of the webhook

    resource

    UUID string to be encoded

  • Decode base64 encoded string into Resource containing cluster id, decoded UUID string and webhook resource type

    Since

    3.0.0

    Declaration

    Swift

    public func base64Decode(encodedResource: String) -> Resource

    Parameters

    encodedResource

    Encoded base64 string

  • Undocumented

    Declaration

    Swift

    public func omniusServiceBridge(_ omniusServiceBridge: OmniusServiceBridgeProtocol, showUCSSOLoginView ssoUrl: String)
  • Undocumented

    Declaration

    Swift

    public func omniusServiceBridgeShowUCNonSSOLoginView(_ omniusServiceBridge: OmniusServiceBridgeProtocol)
  • Undocumented

    Declaration

    Swift

    public func omniusServiceBridgeShowUCDomainUDSServerInput(_ omniusServiceBridge: OmniusServiceBridgeProtocol)
  • Undocumented

    Declaration

    Swift

    public func omniusServiceBridgeOnUCLogged(in omniusServiceBridge: OmniusServiceBridgeProtocol)
  • Undocumented

    Declaration

    Swift

    public func omniusServiceBridge(onUCLoggedOut omniusServiceBridge: OmniusServiceBridgeProtocol)
  • Undocumented

    Declaration

    Swift

    public func omniusServiceBridge(onUCLoginFailed omniusServiceBridge: OmniusServiceBridgeProtocol)
  • Undocumented

    Declaration

    Swift

    public func omniusServiceBridge(_ omniusServiceBridge: OmniusServiceBridgeProtocol, onUCServerConnectionStateChanged status: CHUCLoginServerConnectionStatus, failureReason: CHPhoneServiceRegistrationFailureReason)