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
SKTConversationDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationUnreadCountDidChangeNotificationSwift
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
SKTConversationImageKeyDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationImageUploadDidStartNotificationSwift
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
SKTConversationImageKeySee
SKTConversationProgressKeyDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationImageUploadProgressDidChangeNotificationSwift
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
SKTMessageSee
SKTConversationImageKeySee
SKTConversationMessageKeySee
SKTConversationErrorKeyDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationImageUploadCompletedNotificationSwift
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
SKTConversationFileKeyDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationFileUploadDidStartNotificationSwift
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
SKTConversationFileKeySee
SKTConversationProgressKeyDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationFileUploadProgressDidChangeNotificationSwift
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
SKTMessageSee
SKTConversationFileKeySee
SKTConversationMessageKeySee
SKTConversationErrorKeyDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationFileUploadCompletedNotificationSwift
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
SKTMessageSee
SKTConversationNewMessagesKeyDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationDidReceiveMessagesNotificationSwift
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
SKTMessageSee
SKTConversationPreviousMessagesKeyDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationDidReceivePreviousMessagesNotificationSwift
static let SKTConversationDidReceivePreviousMessages: NSNotification.Name -
@abstract Posted when a conversation activity has been created, such as typing start/stop
See
SKTConversationActivitySee
SKTConversationActivityKeyDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationDidReceiveActivityNotificationSwift
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
SKTConversationDidReceiveMessagesNotificationDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationNewMessagesKeySwift
let SKTConversationNewMessagesKey: String -
@abstract A key whose value is an NSArray of SKTMessage objects
@discussion This key is used with SKTConversationDidReceivePreviousMessagesNotification notification
See
SKTConversationDidReceivePreviousMessagesNotificationDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationPreviousMessagesKeySwift
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
SKTConversationImageUploadDidStartNotificationSee
SKTConversationImageUploadProgressDidChangeNotificationSee
SKTConversationImageUploadCompletedNotificationDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationImageKeySwift
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
SKTConversationFileUploadDidStartNotificationSee
SKTConversationFileUploadProgressDidChangeNotificationSee
SKTConversationFileUploadCompletedNotificationDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationFileKeySwift
let SKTConversationFileKey: String -
@abstract A key whose value is an NSError.
@discussion This key is used with SKTConversationImageUploadCompletedNotification notification.
See
SKTConversationImageUploadCompletedNotificationDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationErrorKeySwift
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
SKTConversationImageUploadCompletedNotificationDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationMessageKeySwift
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
SKTConversationImageUploadProgressDidChangeNotificationDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationProgressKeySwift
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
SKTConversationDidReceiveActivityNotificationDeclaration
Objective-C
extern NSString *const _Nonnull SKTConversationActivityKeySwift
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 SKTConversationActivityTypeTypingStartSwift
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 SKTConversationActivityTypeTypingStopSwift
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 SKTConversationActivityTypeConversationReadSwift
let SKTConversationActivityTypeConversationRead: String -
@abstract An activity type indicating that the current user was added to a conversation
Declaration
Objective-C
extern NSString *const _Nonnull SKTConversationActivityTypeConversationAddedSwift
let SKTConversationActivityTypeConversationAdded: String -
@abstract An activity type indicating that the current user was removed from a conversation
Declaration
Objective-C
extern NSString *const _Nonnull SKTConversationActivityTypeConversationRemovedSwift
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 SKTConversationActivityTypeParticipantAddedSwift
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 SKTConversationActivityTypeParticipantRemovedSwift
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 SKTConversationActivityDataNameKeySwift
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 SKTConversationActivityDataAvatarUrlKeySwift
let SKTConversationActivityDataAvatarUrlKey: String -
@abstract Notification that is fired when a message fails to upload.
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageUploadFailedNotificationSwift
static let SKTMessageUploadFailed: NSNotification.Name -
@abstract Notification that is fired when a message uploads successfully.
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageUploadCompletedNotificationSwift
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 SKTMessageTypeImageSwift
let SKTMessageTypeImage: String -
@abstract A type of message that contains text and/or action buttons
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageTypeTextSwift
let SKTMessageTypeText: String -
@abstract A type of message that contains a location
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageTypeLocationSwift
let SKTMessageTypeLocation: String -
@abstract A type of message that contains a file and/or text
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageTypeFileSwift
let SKTMessageTypeFile: String -
@abstract A type of message that contains a horizontally scrollable set of items
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageTypeCarouselSwift
let SKTMessageTypeCarousel: String -
@abstract A type of message that contains a vertically scrollable set of items
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageTypeListSwift
let SKTMessageTypeList: String -
@abstract horizontal image aspect ratio
Declaration
Objective-C
extern NSString *const _Nonnull SKTImageAspectRatioHorizontalSwift
let SKTImageAspectRatioHorizontal: String -
@abstract squared image aspect ratio
Declaration
Objective-C
extern NSString *const _Nonnull SKTImageAspectRatioSquareSwift
let SKTImageAspectRatioSquare: String -
@abstract Type for a link action.
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageActionTypeLinkSwift
let SKTMessageActionTypeLink: String -
@abstract Type for a webview action.
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageActionTypeWebviewSwift
let SKTMessageActionTypeWebview: String -
@abstract Type for a buy action.
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageActionTypeBuySwift
let SKTMessageActionTypeBuy: String -
@abstract Type for a postback action.
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageActionTypePostbackSwift
let SKTMessageActionTypePostback: String -
@abstract Type for a reply action
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageActionTypeReplySwift
let SKTMessageActionTypeReply: String -
@abstract Type for a location request
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageActionTypeLocationRequestSwift
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 SKTMessageActionStateOfferedSwift
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 SKTMessageActionStatePaidSwift
let SKTMessageActionStatePaid: String -
@abstract A full-sized webview
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageActionWebviewSizeFullSwift
let SKTMessageActionWebviewSizeFull: String -
@abstract A tall-sized webview
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageActionWebviewSizeTallSwift
let SKTMessageActionWebviewSizeTall: String -
@abstract A compact-sized webview
Declaration
Objective-C
extern NSString *const _Nonnull SKTMessageActionWebviewSizeCompactSwift
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 SKTMenuItemCameraSwift
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 SKTMenuItemGallerySwift
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 SKTMenuItemDocumentSwift
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 SKTMenuItemLocationSwift
let SKTMenuItemLocation: String -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT double SmoochVersionNumberSwift
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] != nilDeclaration
Objective-C
extern NSString *const _Nonnull SKTPushNotificationIdentifierSwift
let SKTPushNotificationIdentifier: String -
@abstract User info dictionary key for an SKTUser after a successful call to +login:jwt:completionHandler:
See
SKTUserSee
SKTLoginDidCompleteNotificationSee
+login:jwt:completionHandler:Declaration
Objective-C
extern NSString *const _Nonnull SKTUserIdentifierSwift
let SKTUserIdentifier: String -
@abstract User info dictionary key for an SKTConversation after a successful call to +startConversationWithCompletionHandler:
See
SKTConversationSee
+startConversationWithCompletionHandler:Declaration
Objective-C
extern NSString *const _Nonnull SKTConversationIdentifierSwift
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
SKTInitializationDidFailNotificationSee
SKTLoginDidFailNotificationSee
SKTLogoutDidFailNotificationSee
+initWithSettings:completionHandler:See
+login:jwt:completionHandler:See
+logoutWithCompletionHandler:Declaration
Objective-C
extern NSString *const _Nonnull SKTErrorCodeIdentifierSwift
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
SKTInitializationDidFailNotificationSee
SKTLoginDidFailNotificationSee
SKTLogoutDidFailNotificationSee
+initWithSettings:completionHandler:See
+login:jwt:completionHandler:See
+logoutWithCompletionHandler:Declaration
Objective-C
extern NSString *const _Nonnull SKTErrorDescriptionIdentifierSwift
let SKTErrorDescriptionIdentifier: String -
@abstract Custom error domain identifier
Declaration
Objective-C
extern NSString *const _Nonnull SKTErrorDomainIdentifierSwift
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
SKTInitializationDidFailNotificationSee
SKTLoginDidFailNotificationSee
SKTLogoutDidFailNotificationSee
+initWithSettings:completionHandler:See
+login:jwt:completionHandler:See
+logoutWithCompletionHandler:Declaration
Objective-C
extern NSString *const _Nonnull SKTStatusCodeIdentifierSwift
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 SKTUserNotificationReplyActionIdentifierSwift
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 SKTUserNotificationReplyCategoryIdentifierSwift
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 SKTInitializationDidCompleteNotificationSwift
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
userInfodictionary included with it.See
SKTErrorCodeIdentifierSee
SKTErrorDescriptionIdentifierSee
SKTStatusCodeIdentifierDeclaration
Objective-C
extern NSString *const _Nonnull SKTInitializationDidFailNotificationSwift
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
SKTUserIdentifierDeclaration
Objective-C
extern NSString *const _Nonnull SKTLoginDidCompleteNotificationSwift
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
userInfodictionary included with it.See
SKTErrorCodeIdentifierSee
SKTErrorDescriptionIdentifierSee
SKTStatusCodeIdentifierDeclaration
Objective-C
extern NSString *const _Nonnull SKTLoginDidFailNotificationSwift
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 SKTLogoutDidCompleteNotificationSwift
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
SKTErrorCodeIdentifierSee
SKTErrorDescriptionIdentifierSee
SKTStatusCodeIdentifierDeclaration
Objective-C
extern NSString *const _Nonnull SKTLogoutDidFailNotificationSwift
static let SKTLogoutDidFail: NSNotification.Name
Constants Reference