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
  • This is the Authenticator object from the application when constructing this Webex object. It can be used to check and modify authentication state.

    Since

    1.2.0

    Declaration

    Swift

    public var authenticator: Authenticator?
  • Register for WebexAuthDelegate instance to receive all authentication related event callbacks.

    Since

    3.11.2

    Declaration

    Swift

    public weak var authDelegate: WebexAuthDelegate?
  • This delegate is used to listen for events from the UC server

    Since

    3.0.0

    Declaration

    Swift

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

    Since

    1.2.0

    Declaration

    Swift

    public static var version: String { get }
  • A client wrapper of the Cisco Webex Calendar Meeting API

    Since

    3.2.0

    See

    CalendarMeetings API about how to deal with Calendar Meetings

    Declaration

    Swift

    public let calendarMeetings: CalendarMeetingClient
  • 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

  • Denotes if syncing latest conversations to local data warehouse is complete

    Since

    3.8.0

    Declaration

    Swift

    public var onInitialSpacesSyncCompleted: (() -> Void)? { get set }
  • 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

  • This struct represents the caller related information received from VoIP payload

    Since

    3.10.0
    See more

    Declaration

    Swift

    public struct VoicePushInfo
  • Parses and returns the caller related information from the VoIP notification

    Since

    3.10.0

    Declaration

    Swift

    public func parseVoIPPayload(payload: PKPushPayload) -> VoicePushInfo?

    Parameters

    payload

    VoIP payload received from APNS.

    Return Value

    An object of VoicePushInfo

  • Sets the Calling server URL and domain for authentication with Calling service. Below API is used to set user entered server url or domain towards SDK.

    Since

    3.0.0

    Declaration

    Swift

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

    Parameters

    ucDomain

    the domain for Calling server

    serverUrl

    the serverUrl for Calling server

  • Retry the SSO Session for UC Login, call this API when onUCSSOLoginFailed is executed to retry the login

    Since

    3.6.0

    Declaration

    Swift

    public func retryUCSSOLogin()
  • To force register the Phone Services on current iOS device when PhoneServiceRegistrationFailureReason is RegisteredElsewhere

    Since

    3.6.0

    Declaration

    Swift

    public func forceRegisterPhoneServices()
  • Setting a calling service credentials in required to authenticate while doing non SSO login.

    Since

    3.0.0

    Declaration

    Swift

    @available(*, deprecated, renamed: "setCallServiceCredential")
    public func setCUCMCredential(username: String, password: String)

    Parameters

    username

    A username for Non SSO login

    password

    A password for Non SSO login

  • Setting username and password for authentication with calling service. Typically this information is obtained from user after [setCallServerDomainUrl]

    Declaration

    Swift

    public func setCallServiceCredential(username: String, password: String)
  • Opens web view for SSO authentication for Calling server 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 Calling server

  • Cancels currents SSO authentication for Calling server login

    Since

    3.0.0

    Declaration

    Swift

    public func ucCancelSSOLogin()
  • To initiate the CUCM services, must be called before calling any other Calling server API

    Since

    3.6.0

    Declaration

    Swift

    public func startUCServices()
  • Returns true if user already signed into Calling server, false otherwise

    Since

    3.0.0

    Declaration

    Swift

    public func isUCLoggedIn() -> Bool
  • Get the Calling service 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