Classes
The following classes are available globally.
-
Declaration
Swift
public class JWTAuthKeychainStorage : JWTAuthStorage
-
A JSON Web Token (JWT) based authentication strategy is to be used to authenticate a guest user on Cisco Spark.
See moreSince
1.2.0Declaration
Swift
public class JWTAuthenticator : Authenticator
-
An OAuth based authentication strategy for authenticating a user on Cisco Spark.
See moreSince
1.2.0Declaration
Swift
public class OAuthAuthenticator : Authenticator
-
Declaration
Swift
public class OAuthKeychainStorage : OAuthStorage
-
An Single sign-on SSO based authentication strategy used to authenticate a user on Cisco Spark.
See moreSince
1.3.1Declaration
Swift
public class SSOAuthenticator : OAuthAuthenticator
-
Declaration
Swift
public class MembershipClient
-
Declaration
Swift
public class LocalFile
-
Declaration
Swift
public class MessageClient
-
Declaration
Swift
public class PersonClient
-
A Call represents a media call on Cisco Spark.
The application can create an outgoing call by calling phone.dial function:
let address = "coworker@example.com" let localVideoView = MediaRenderView() let remoteVideoView = MediaRenderView() let mediaOption = MediaOption.audioVideo(local: localVideoView, remote: remoteVideoView) spark.phone.dial(address, option:mediaOption) { switch ret { case .success(let call): // success call.onConnected = { } call.onDisconnected = { reason in } case .failure(let error): // failure } }The application can receive an incoming call on phone.onIncoming function:
spark.phone.onIncoming = { call in call.answer(option: mediaOption) { error in if let error = error { // success } else { // failure } } }See
see Phone API about how to create calls.See
CallStatus for the states and transitions of a Call.See moreSince
1.2.0Declaration
Swift
public class Call
-
Undocumented
See moreDeclaration
Swift
public class MediaRenderView : UIView
-
Phone represents a Cisco Spark calling device. The application can obtain a phone object from Spark object and use phone to call other Cisco Spark users or PSTN when enabled. The phone must be registered before it can make or receive calls.
spark.phone.register() { error in if let error = error { ... // Device was not registered, and no calls can be sent or received } else { ... // Successfully registered device } }See moreSince
1.2.0Declaration
Swift
public class Phone
-
Declaration
Swift
public class RoomClient
-
Spark object is the entry point to use this Cisco Spark iOS SDK. A Spark 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 Spark cloud.
let clientId = "Def123456..." let clientSecret = "fed456..." let scope = "spark:all" let redirectUri = "MyCustomApplication://response" let authenticator = OAuthAuthenticator(clientId: clientId, clientSecret: clientSecret, scope: scope, redirectUri: redirectUri) let spark = Spark(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 Spark cloud.
let authenticator = JWTAuthenticator() let spark = Spark(authenticator: authenticator) ... if !authenticator.authorized { authenticator.authorizedWith(jwt: myJwt) }Attention
All APIs on Cisco Spark iOS SDK are expected to run on the application’s main thread, unless specified otherwise.See moreSince
1.2.0Declaration
Swift
public class Spark
-
Declaration
Swift
public class TeamClient
-
Declaration
Swift
public class TeamMembershipClient
-
A data type represents an email address with validation and equatable implementation.
See moreSince
1.2.0Declaration
Swift
open class EmailAddress
-
Declaration
Swift
public class WebhookClient
View on GitHub
Classes Reference