SCServiceCloud


@interface SCServiceCloud : NSObject

Shared singleton class used as the primary access point for the Snap-ins SDK.

Overview

This class gives you access to all the features of the SDK and allows you to configure or customize the SDK. Use the +[SCServiceCloud sharedInstance] class method to access the singleton for this class.

You can access each of the SDK features with properties on this singleton: SCServiceCloud.knowledge, SCServiceCloud.cases, SCServiceCloud.chatUI, SCServiceCloud.sos.

Specify your SCServiceCloudDelegate implementation using the SCServiceCloud.delegate property. With this delegate, you can respond to events and make decisions on behalf of the SDK.

Configuration & Customization

Specify the Knowledge and Case Management configuration settings using the SCServiceCloud.serviceConfiguration property.

Customize the appearance of the interface (such as the colors, fonts, images, and strings) using the SCServiceCloud.appearanceConfiguration property. To learn more about SDK customizations, see Color Branding and SDK Customizations in the Developer Guide.

Authentication & Notifications

Knowledge and Case Management both have an option to authenticate users so that users can access information related to their user account or their user profile. To learn more about authentication, see Authentication.

SCServiceCloud allows you to explicitly set the authentication settings using -setAuthenticationSettings:forServiceType:completion:. You can also check the authentication for a particular service using -authenticationSettingsForServiceType:. Refer to SCSAuthenticationSettings for the core class associated with authentication.

Authenticated users can be notified using push notifications when there is activity on their cases. To learn more about notifications see Push Notifications for Case Activity.

SCServiceCloud lets you determine whether the SDK can handle a remote push notification with -notificationFromRemoteNotificationDictionary:. If the notification can be handled by the SDK, pass it to the -showInterfaceForNotification: method.

Action Buttons

You can customize the action buttons used throughout the UI. You can override the look and the behavior of existing buttons, and you can create buttons associated with new actions. Use the SCServiceCloud.actions property to get access to SCSActionManager and the action button API.

  • Returns the shared service cloud manager for this process.

    Declaration

    Objective-C

    + (nonnull instancetype)sharedInstance;

    Swift

    class func shared() -> Self

    Return Value

    Initialized shared instace.

  • Directory URL where shared files will be stored on the filesystem. If nil, the system will supply the appropriate path given the application context. This value should be used if Snap-ins features will be accessible from multiple extensions within your application to ensure data is stored in a location accessible to all app extensions.

    Warning

    NOTE This value must be set prior to the initialization of any system resources or classes utilizing Snap-ins features. The behavior is undefined if the value is changed after the fact.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable, class)
        NSURL *sharedDataDirectory;

    Swift

    class var sharedDataDirectory: URL? { get set }
  • Identifies the primary window where view controllers should be placed when presented.

    This value is automatically determined under most circumstances, but in the event that a custom value needs to be set, the primaryWindow property can be set to a specific window that should be used.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) UIWindow *primaryWindow;

    Swift

    var primaryWindow: UIWindow? { get set }
  • The delegate for the service interface manager.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable)
        NSObject<SCServiceCloudDelegate> *delegate;

    Swift

    weak var delegate: SCServiceCloudDelegate? { get set }
  • The appearance style to use in presented views and view controllers.

    The default value for this is SCInterfaceStyleDefault. If this value is set after the interface has already been presented, it results in the service interface being dismissed.

    Warning

    We recommend that you only assign this property once in the lifetime of an application. Changing interface styles at runtime may have unpredictable results, and the behavior is undefined.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *_Nonnull interfaceStyle;

    Swift

    var interfaceStyle: String { get set }
  • Sets the appearance configuration for the service interface. If not specified, this value falls back to default values.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic)
        SCAppearanceConfiguration *_Nonnull appearanceConfiguration;

    Swift

    var appearanceConfiguration: SCAppearanceConfiguration { get set }
  • Configuration object used to define the self-service parameters used to enable with Cases and/or Knowledge features.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic)
        SCSServiceConfiguration *_Nonnull serviceConfiguration;

    Swift

    var serviceConfiguration: SCSServiceConfiguration { get set }
  • The singleton instance for Case Management.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) SCCaseInterface *cases;

    Swift

    var cases: SCCaseInterface! { get }
  • The singleton instance of the chat core interface. For access to the chat user interface, see SCServiceCloud.chatUI.

    See

    SCSChat

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) SCSChat *chatCore;

    Swift

    var chatCore: SCSChat! { get }
  • Access point for interacting with the floating action bar.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) SCSActionManager *_Nonnull actions;

    Swift

    var actions: SCSActionManager { get }
  • sos

    The singleton instance for SOS.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) SOSSessionManager *sos;

    Swift

    var sos: SOSSessionManager! { get }