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 components, customizations, and the authentication UI.

public protocol OWUI {
    var components: OWUIComponents { get }    // New in 3.0.0
    var flows: OWUIFlows { get }              // Deprecated in 3.0.0
    var views: OWUIViews { get }              // Deprecated in 3.0.0
    var customizations: OWCustomizations { get }
    var authenticationUI: OWUIAuthentication { get }
}
📘

Starting in version 3.0.0, use components (OWUIComponents) instead of flows (OWUIFlows) and views (OWUIViews).

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.

let manager: OWManagerProtocol = OpenWeb.manager
manager.spotId = "someSpotId"

Next Step