Webex
public class Webex
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 = "webex:all"
let redirectUri = "MyCustomApplication://response"
let authenticator = OAuthAuthenticator(clientId: clientId, clientSecret: clientSecret, scope: scope, redirectUri: redirectUri)
let webex = Webex(authenticator: authenticator)
...
if !authenticator.authorized {
authenticator.authorize(parentViewController: self) { success in
if !success {
print("User not authorized")
}
}
}
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)
...
if !authenticator.authorized {
authenticator.authorizedWith(jwt: myJwt)
}
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-
The version number of this Cisco Webex iOS SDK.
Since
1.2.0Declaration
Swift
public static let version: String
-
The logger for this SDK.
Since
1.2.0Declaration
Swift
public var logger: Logger? { get set }
-
Set the log level of the console logging.
Since
1.2.0Declaration
Swift
public var consoleLogger: LogLevel { get set }
-
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.0Declaration
Swift
public let authenticator: Authenticator
-
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.0Declaration
Swift
public lazy var phone: Phone { get set }
-
MessageClient represent activities relates to the user. Use messages to create and manage the activities on behalf of the authenticated user.
Since
1.4.0Declaration
Swift
public lazy var messages: MessageClient { get set }
-
Memberships represent a person’s relationships to spaces. Use membership to manage the authenticated user’s relationship to spaces.
Since
1.2.0See
Spaces API about how to manage spaces.See
Messages API about how post or otherwise manage the content in a space.Declaration
Swift
public lazy var memberships: MembershipClient { get set }
-
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.0See
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 lazy var spaces: SpaceClient { get set }
-
Constructs a new Webex object with an
Authenticator
.Since
1.2.0Declaration
Swift
public init(authenticator: Authenticator)
Parameters
authenticator
The authentication strategy for this SDK.
-
People are registered users of Cisco Webex. Use people to find a person on behalf of the authenticated user.
Since
1.2.0See
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 var people: PersonClient { get }
-
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.0Declaration
Swift
public var webhooks: WebhookClient { get }
-
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.0See
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 var teams: TeamClient { get }
-
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.0See
Teams API about how to manage teams.See
Spaces API about how to manage spaces.Declaration
Swift
public var teamMemberships: TeamMembershipClient { get }