SDK Structure
Understand the organization of the OpenWeb iOS SDK
The OpenWeb iOS SDK is comprised of layers that conform to various protocols.
The primary protocol is the OWManagerProtocol
.
OpenWeb.manager
is the gateway for developers to interface with the SDK. This manager is a singleton class that conforms to the OWManagerProtocol
.
public protocol OWManagerProtocol {
var spotId: OWSpotId { get set }
var ui: OWUI { get }
var authentication: OWAuthentication { get }
var helpers: OWHelpers { get }
var analytics: OWAnalytics { get }
}
By leveraging the manager, you can engage and interact seamlessly with various layers of the SDK.
And through the OWUI
protocol, you can access visual Conversation aspects of such as flows, views, customizations, and the authentication UI.
public protocol OWUI {
var flows: OWUIFlows { get }
var views: OWUIViews { get }
var customizations: OWCustomizations { get }
var authenticationUI: OWUIAuthentication { get }
}
Subsequent sections of the documentation delve deeper into each of these layers.
Setting Up SpotID
Your spotId
is provided by your PSM. This ID is crucial as it is the primary identifier for interactions. The manager assists in setting this spotId
.
It is imperative to set the
spotId
via the manager before invoking any other part of the API.
var manager: OWManagerProtocol = OpenWeb.manager
manager.spotId = "someSpotId"
Updated about 1 month ago