Constants

The following constants are available globally.

  • @abstract Posted when the count of unread messages changes. The notification object will be an instance of SKTConversation, of which you can then inspect the messageCount property.

    See

    SKTConversation

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationUnreadCountDidChangeNotification

    Swift

    static let SKTConversationUnreadCountDidChange: NSNotification.Name
  • @abstract Posted when an image upload begins.

    @discussion The userInfo dictionary contains the UIImage to upload. Use SKTConversationImageKey to access this value.

    This notification is guaranteed to fire on the main thread.

    See

    SKTConversationImageKey

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationImageUploadDidStartNotification

    Swift

    static let SKTConversationImageUploadDidStart: NSNotification.Name
  • @abstract Posted when an image upload receives a progress update.

    @discussion The userInfo dictionary contains the UIImage being uploaded, as well as an NSNumber reflecting the current progress. Use SKTConversationImageKey and SKTConversationProgressKey to access these values.

    This notification is guaranteed to fire on the main thread.

    See

    SKTConversationImageKey

    See

    SKTConversationProgressKey

    Declaration

    Objective-C

    extern NSString
        *const _Nonnull SKTConversationImageUploadProgressDidChangeNotification

    Swift

    static let SKTConversationImageUploadProgressDidChange: NSNotification.Name
  • @abstract Posted when an image upload completes, either in success or failure.

    @discussion The userInfo dictionary contains the UIImage that was uploaded. Use SKTConversationImageKey to access this value.

    If the upload succeeded, the userInfo dictionary will also include the SKTMessage instance of the new message. Use SKTConversationMessageKey to access this value. If the upload failed, the userInfo dictionary will include the NSError that occurred. Use SKTConversationErrorKey to access this value.

    This notification is guaranteed to fire on the main thread.

    See

    SKTMessage

    See

    SKTConversationImageKey

    See

    SKTConversationMessageKey

    See

    SKTConversationErrorKey

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationImageUploadCompletedNotification

    Swift

    static let SKTConversationImageUploadCompleted: NSNotification.Name
  • @abstract Posted when a file upload begins.

    @discussion The userInfo dictionary contains the url of the file to upload. Use SKTConversationFileKey to access this value.

    This notification is guaranteed to fire on the main thread.

    See

    SKTConversationFileKey

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationFileUploadDidStartNotification

    Swift

    static let SKTConversationFileUploadDidStart: NSNotification.Name
  • @abstract Posted when a file upload receives a progress update.

    @discussion The userInfo dictionary contains the url of the file being uploaded, as well as an NSNumber reflecting the current progress. Use SKTConversationFileKey and SKTConversationProgressKey to access these values.

    This notification is guaranteed to fire on the main thread.

    See

    SKTConversationFileKey

    See

    SKTConversationProgressKey

    Declaration

    Objective-C

    extern NSString
        *const _Nonnull SKTConversationFileUploadProgressDidChangeNotification

    Swift

    static let SKTConversationFileUploadProgressDidChange: NSNotification.Name
  • @abstract Posted when a file upload completes, either in success or failure.

    @discussion The userInfo dictionary contains the url of the file that was uploaded. Use SKTConversationFileKey to access this value.

    If the upload succeeded, the userInfo dictionary will also include the SKTMessage instance of the new message. Use SKTConversationMessageKey to access this value. If the upload failed, the userInfo dictionary will include the NSError that occurred. Use SKTConversationErrorKey to access this value.

    This notification is guaranteed to fire on the main thread.

    See

    SKTMessage

    See

    SKTConversationFileKey

    See

    SKTConversationMessageKey

    See

    SKTConversationErrorKey

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationFileUploadCompletedNotification

    Swift

    static let SKTConversationFileUploadCompleted: NSNotification.Name
  • @abstract Posted when new messages are received from the server.

    @discussion The userInfo dictionary contains an NSArray of SKTMessage objects. Use SKTConversationNewMessagesKey to access this value.

    See

    SKTMessage

    See

    SKTConversationNewMessagesKey

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationDidReceiveMessagesNotification

    Swift

    static let SKTConversationDidReceiveMessages: NSNotification.Name
  • @abstract Posted when an operation to load previous messages in a conversation has been completed

    @discussion This notification is posted as the result of [SKTConversation loadPreviousMessages]

    If the operation succeeded, the object returned by this notification will include the updated array of messages If the operation failed, the userInfo dictionary will contain an “error” object with the response error

    See

    SKTMessage

    See

    SKTConversationPreviousMessagesKey

    Declaration

    Objective-C

    extern NSString
        *const _Nonnull SKTConversationDidReceivePreviousMessagesNotification

    Swift

    static let SKTConversationDidReceivePreviousMessages: NSNotification.Name
  • @abstract Posted when a conversation activity has been created, such as typing start/stop

    See

    SKTConversationActivity

    See

    SKTConversationActivityKey

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationDidReceiveActivityNotification

    Swift

    static let SKTConversationDidReceiveActivity: NSNotification.Name
  • @abstract A key whose value is an NSArray of SKTMessage objects.

    @discussion This key is used with SKTConversationDidReceiveMessagesNotification notification.

    See

    SKTConversationDidReceiveMessagesNotification

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationNewMessagesKey

    Swift

    let SKTConversationNewMessagesKey: String
  • @abstract A key whose value is an NSArray of SKTMessage objects

    @discussion This key is used with SKTConversationDidReceivePreviousMessagesNotification notification

    See

    SKTConversationDidReceivePreviousMessagesNotification

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationPreviousMessagesKey

    Swift

    let SKTConversationPreviousMessagesKey: String
  • @abstract A key whose value is a UIImage which represents an image being uploaded.

    @discussion This key is used with SKTConversationImageUploadDidStartNotification, SKTConversationImageUploadProgressDidChangeNotification, and SKTConversationImageUploadCompletedNotification notifications.

    See

    SKTConversationImageUploadDidStartNotification

    See

    SKTConversationImageUploadProgressDidChangeNotification

    See

    SKTConversationImageUploadCompletedNotification

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationImageKey

    Swift

    let SKTConversationImageKey: String
  • @abstract A key whose value is an NSURL which represents a file being uploaded.

    @discussion This key is used with SKTConversationFileUploadDidStartNotification, SKTConversationFileUploadProgressDidChangeNotification, and SKTConversationFileUploadCompletedNotification notifications.

    See

    SKTConversationFileUploadDidStartNotification

    See

    SKTConversationFileUploadProgressDidChangeNotification

    See

    SKTConversationFileUploadCompletedNotification

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationFileKey

    Swift

    let SKTConversationFileKey: String
  • @abstract A key whose value is an NSError.

    @discussion This key is used with SKTConversationImageUploadCompletedNotification notification.

    See

    SKTConversationImageUploadCompletedNotification

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationErrorKey

    Swift

    let SKTConversationErrorKey: String
  • @abstract A key whose value is an SKTMessage object representing the newly created message.

    @discussion This key is used with SKTConversationImageUploadCompletedNotification notification.

    See

    SKTConversationImageUploadCompletedNotification

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationMessageKey

    Swift

    let SKTConversationMessageKey: String
  • @abstract A key whose value is an NSNumber reflecting the current progress of an image upload.

    @discussion This key is used with SKTConversationImageUploadProgressDidChangeNotification notification.

    See

    SKTConversationImageUploadProgressDidChangeNotification

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationProgressKey

    Swift

    let SKTConversationProgressKey: String
  • @abstract A key whose value is a SKTConversationActivity object representing the newly created activity

    @discussion This key is used with SKTConversationDidReceiveActivityNotification notification.

    See

    SKTConversationDidReceiveActivityNotification

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationActivityKey

    Swift

    let SKTConversationActivityKey: String
  • @abstract An activity type indicating that a participant of the converation started typing a response

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationActivityTypeTypingStart

    Swift

    let SKTConversationActivityTypeTypingStart: String
  • @abstract An activity type indicating that a participant of the converation stopped typing a response

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationActivityTypeTypingStop

    Swift

    let SKTConversationActivityTypeTypingStop: String
  • @abstract An activity type indicating that a participant of the converation recently read the user message

    This event type is triggered for the current user when the conversation is read on a different device.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationActivityTypeConversationRead

    Swift

    let SKTConversationActivityTypeConversationRead: String
  • @abstract An activity type indicating that the current user was added to a conversation

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationActivityTypeConversationAdded

    Swift

    let SKTConversationActivityTypeConversationAdded: String
  • @abstract An activity type indicating that the current user was removed from a conversation

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationActivityTypeConversationRemoved

    Swift

    let SKTConversationActivityTypeConversationRemoved: String
  • @abstract An activity type indicating that another user was added to a conversation that the current user is part of

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationActivityTypeParticipantAdded

    Swift

    let SKTConversationActivityTypeParticipantAdded: String
  • @abstract An activity type indicating that another user was removed from a conversation that the current user is part of

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationActivityTypeParticipantRemoved

    Swift

    let SKTConversationActivityTypeParticipantRemoved: String
  • @abstract A key whose value is an NSString representing the business name.

    @discussion This key is used in the SKTConversationActivity data object.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationActivityDataNameKey

    Swift

    let SKTConversationActivityDataNameKey: String
  • @abstract A key whose value is an NSString representing the URL of the business avatar.

    @discussion This key is used in the SKTConversationActivity data object.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationActivityDataAvatarUrlKey

    Swift

    let SKTConversationActivityDataAvatarUrlKey: String
  • @abstract Notification that is fired when a message fails to upload.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageUploadFailedNotification

    Swift

    static let SKTMessageUploadFailed: NSNotification.Name
  • @abstract Notification that is fired when a message uploads successfully.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageUploadCompletedNotification

    Swift

    static let SKTMessageUploadCompleted: NSNotification.Name
  • @abstract A type of message that contains an image, text, and/or action buttons

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageTypeImage

    Swift

    let SKTMessageTypeImage: String
  • @abstract A type of message that contains text and/or action buttons

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageTypeText

    Swift

    let SKTMessageTypeText: String
  • @abstract A type of message that contains a location

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageTypeLocation

    Swift

    let SKTMessageTypeLocation: String
  • @abstract A type of message that contains a file and/or text

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageTypeFile

    Swift

    let SKTMessageTypeFile: String
  • @abstract A type of message that contains a horizontally scrollable set of items

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageTypeCarousel

    Swift

    let SKTMessageTypeCarousel: String
  • @abstract A type of message that contains a vertically scrollable set of items

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageTypeList

    Swift

    let SKTMessageTypeList: String
  • @abstract horizontal image aspect ratio

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTImageAspectRatioHorizontal

    Swift

    let SKTImageAspectRatioHorizontal: String
  • @abstract squared image aspect ratio

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTImageAspectRatioSquare

    Swift

    let SKTImageAspectRatioSquare: String
  • @abstract Type for a link action.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageActionTypeLink

    Swift

    let SKTMessageActionTypeLink: String
  • @abstract Type for a webview action.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageActionTypeWebview

    Swift

    let SKTMessageActionTypeWebview: String
  • @abstract Type for a buy action.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageActionTypeBuy

    Swift

    let SKTMessageActionTypeBuy: String
  • @abstract Type for a postback action.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageActionTypePostback

    Swift

    let SKTMessageActionTypePostback: String
  • @abstract Type for a reply action

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageActionTypeReply

    Swift

    let SKTMessageActionTypeReply: String
  • @abstract Type for a location request

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageActionTypeLocationRequest

    Swift

    let SKTMessageActionTypeLocationRequest: String
  • @abstract Offered state for a buy message. The user has not yet completed the transaction.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageActionStateOffered

    Swift

    let SKTMessageActionStateOffered: String
  • @abstract Paid state for a buy message. The user has completed the transaction and payment was successful.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageActionStatePaid

    Swift

    let SKTMessageActionStatePaid: String
  • @abstract A full-sized webview

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageActionWebviewSizeFull

    Swift

    let SKTMessageActionWebviewSizeFull: String
  • @abstract A tall-sized webview

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageActionWebviewSizeTall

    Swift

    let SKTMessageActionWebviewSizeTall: String
  • @abstract A compact-sized webview

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMessageActionWebviewSizeCompact

    Swift

    let SKTMessageActionWebviewSizeCompact: String
  • @abstract When added to allowedMenuItems, enables the option to take a photo from the conversation view

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMenuItemCamera

    Swift

    let SKTMenuItemCamera: String
  • @abstract When added to allowedMenuItems, enables the option to select an image or video from gallery from the conversation view

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMenuItemGallery

    Swift

    let SKTMenuItemGallery: String
  • @abstract When added to allowedMenuItems, enables the option to upload a document from the conversation view

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMenuItemDocument

    Swift

    let SKTMenuItemDocument: String
  • @abstract When added to allowedMenuItems, enables the option to share location from the conversation view

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTMenuItemLocation

    Swift

    let SKTMenuItemLocation: String
  • Undocumented

    Declaration

    Objective-C

    FOUNDATION_EXPORT double SmoochVersionNumber

    Swift

    var SmoochVersionNumber: Double
  • Undocumented

    Declaration

    Objective-C

    FOUNDATION_EXPORT const unsigned char SmoochVersionString[]
  • @abstract User info dictionary key to determine the origin of a push notification.

    @discussion Push notifications that originate from Smooch will have a non-nil value for this key.

    BOOL isSmoochNotification = userInfo[SKTPushNotificationIdentifier] != nil

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTPushNotificationIdentifier

    Swift

    let SKTPushNotificationIdentifier: String
  • @abstract User info dictionary key for an SKTUser after a successful call to +login:jwt:completionHandler:

    See

    SKTUser

    See

    SKTLoginDidCompleteNotification

    See

    +login:jwt:completionHandler:

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTUserIdentifier

    Swift

    let SKTUserIdentifier: String
  • @abstract User info dictionary key for an SKTConversation after a successful call to +startConversationWithCompletionHandler:

    See

    SKTConversation

    See

    +startConversationWithCompletionHandler:

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTConversationIdentifier

    Swift

    let SKTConversationIdentifier: String
  • @abstract User info dictionary key to determine the error code of a failed operation. Possible operations that may include this value are +initWithSettings:completionHandler:, +login:jwt:completionHandler: and +logoutWithCompletionHandler:

    @discussion Possible values include, but are not limited to, “unauthorized”, “invalid_auth”, “bad_request”, “unhandled_error”, “invalid_app” or an empty string for connectivity errors

    See

    SKTInitializationDidFailNotification

    See

    SKTLoginDidFailNotification

    See

    SKTLogoutDidFailNotification

    See

    +initWithSettings:completionHandler:

    See

    +login:jwt:completionHandler:

    See

    +logoutWithCompletionHandler:

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTErrorCodeIdentifier

    Swift

    let SKTErrorCodeIdentifier: String
  • @abstract User info dictionary key to determine the error description of a failed operation. Possible operations that include this value are +initWithSettings:completionHandler:, +login:jwt:completionHandler: and +logoutWithCompletionHandler:

    See

    SKTInitializationDidFailNotification

    See

    SKTLoginDidFailNotification

    See

    SKTLogoutDidFailNotification

    See

    +initWithSettings:completionHandler:

    See

    +login:jwt:completionHandler:

    See

    +logoutWithCompletionHandler:

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTErrorDescriptionIdentifier

    Swift

    let SKTErrorDescriptionIdentifier: String
  • @abstract Custom error domain identifier

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTErrorDomainIdentifier

    Swift

    let SKTErrorDomainIdentifier: String
  • @abstract User info dictionary key to determine the HTTP status code of a failed operation. Possible operations that include this value are +initWithSettings:completionHandler:, +login:jwt:completionHandler: and +logoutWithCompletionHandler:

    @discussion User info dictionary key to determine the HTTP status code of a failed operation

    See

    SKTInitializationDidFailNotification

    See

    SKTLoginDidFailNotification

    See

    SKTLogoutDidFailNotification

    See

    +initWithSettings:completionHandler:

    See

    +login:jwt:completionHandler:

    See

    +logoutWithCompletionHandler:

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTStatusCodeIdentifier

    Swift

    let SKTStatusCodeIdentifier: String
  • @abstract Identifier for a Smooch user notification reply action.

    @discussion Used as the identifier for a UIUserNotificationAction on iOS 9, and a UNTextInputNotificationAction on iOS 10 and above.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTUserNotificationReplyActionIdentifier

    Swift

    let SKTUserNotificationReplyActionIdentifier: String
  • @abstract Identifier for a Smooch user notification category.

    @discussion Used as the identifier for a UIUserNotificationCategory on iOS 9, and a UNNotificationCategory on iOS 10 and above.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTUserNotificationReplyCategoryIdentifier

    Swift

    let SKTUserNotificationReplyCategoryIdentifier: String
  • @abstract Notification that fires when initialization completes successfully

    @discussion This notification is fired each time a call to +initWithSettings:completionHandler: completes with a non-error status code.

    See

    +initWithSettings:completionHandler:

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTInitializationDidCompleteNotification

    Swift

    static let SKTInitializationDidComplete: NSNotification.Name
  • @abstract Notification that fires when initialization fails

    @discussion This notification is fired each time a call to +initWithSettings:completionHandler: fails.

    You may use this notification to know if initialization failed due to an invalid app ID, invalid JWT, or connectivity errors by inspecting the userInfo dictionary included with it.

    See

    SKTErrorCodeIdentifier

    See

    SKTErrorDescriptionIdentifier

    See

    SKTStatusCodeIdentifier

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTInitializationDidFailNotification

    Swift

    static let SKTInitializationDidFail: NSNotification.Name
  • @abstract Notification that fires when +login:jwt:completionHandler: completes successfully

    @discussion This notification is fired each time a call to +login:jwt:completionHandler: completes with a non-error status code.

    See

    +login:jwt:completionHandler:

    See

    SKTUserIdentifier

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTLoginDidCompleteNotification

    Swift

    static let SKTLoginDidComplete: NSNotification.Name
  • @abstract Notification that fires when +login:jwt:completionHandler: fails

    @discussion This notification is fired each time a call to +login:jwt:completionHandler: fails.

    You may use this notification to know if a call to +login:jwt:completionHandler: failed due to an invalid JWT, or connectivity errors by inspecting the userInfo dictionary included with it.

    See

    SKTErrorCodeIdentifier

    See

    SKTErrorDescriptionIdentifier

    See

    SKTStatusCodeIdentifier

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTLoginDidFailNotification

    Swift

    static let SKTLoginDidFail: NSNotification.Name
  • @abstract Notification that fires when +logoutWithCompletionHandler: completes successfully

    @discussion This notification is fired each time a call to +logoutWithCompletionHandler: completes with a non-error status code.

    See

    +logoutWithCompletionHandler:

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTLogoutDidCompleteNotification

    Swift

    static let SKTLogoutDidComplete: NSNotification.Name
  • @abstract Notification that fires when a call to +logoutWithCompletionHandler: fails

    @discussion This notification is fired when a call to +logoutWithCompletionHandler: fails

    See

    SKTErrorCodeIdentifier

    See

    SKTErrorDescriptionIdentifier

    See

    SKTStatusCodeIdentifier

    Declaration

    Objective-C

    extern NSString *const _Nonnull SKTLogoutDidFailNotification

    Swift

    static let SKTLogoutDidFail: NSNotification.Name