BrandMessenger Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | BrandMessenger.h |
+ initWithSettings:completionHandler:
Initialize the BrandMessenger SDK with the provided settings.
+ (void)initWithSettings:(KBMSettings *)settings completionHandler:(nullable void ( ^ ) ( NSError *_Nullable error , NSDictionary *_Nullable userInfo ))handlerParameters
settings |
The settings to use. |
|---|---|
handler |
An optional block to evaluate the result of the operation |
Discussion
This may only be called once (preferably, in application:didFinishLaunchingWithOptions:).
Use +settings to retrieve and modify the given settings object.
See Also
Declared In
BrandMessenger.h
+ settings
Accessor method for the sdk settings.
+ (nullable KBMSettings *)settingsReturn Value
Settings object passed in +initWithSettings:completionHandler:, or nil if +initWithSettings:completionHandler: hasn’t been called yet.
Discussion
Use this object to update settings at run time.
Note: Some settings may only be configured at init time. See the KBMSettings class reference for more information.
See Also
Declared In
BrandMessenger.h
+ show
Presents the BrandMessenger conversation screen.
+ (void)showDiscussion
Uses the top-most view controller of the UIApplicationDelegate as the presenting view controller.
+initWithSettings:completionHandler: must have been called prior to calling this method.
Declared In
BrandMessenger.h
+ showConversationWithId:
Loads the conversation specified by the ID, and presents the BrandMessenger conversation screen
+ (void)showConversationWithId:(NSString *)conversationIdParameters
conversationId |
The ID of the conversation to load |
|---|
Discussion
Uses the top-most view controller of the UIApplicationDelegate as the presenting view controller.
+initWithSettings:completionHandler: must have been called prior to calling this method.
Declared In
BrandMessenger.h
+ showWithStartingText:
Presents the BrandMessenger conversation screen with prefilled text in the message input.
+ (void)showWithStartingText:(nullable NSString *)startingTextDiscussion
Uses the top-most view controller of the UIApplicationDelegate as the presenting view controller with prefilled text in the message input.
+initWithSettings:completionHandler: must have been called prior to calling this method.
Declared In
BrandMessenger.h
+ showConversationWithId:andStartingText:
Loads the conversation specified by the ID, and presents the BrandMessenger conversation screen with prefilled text in the message input.
+ (void)showConversationWithId:(NSString *)conversationId andStartingText:(nullable NSString *)startingTextParameters
conversationId |
The ID of the conversation to load |
|---|---|
startingText |
The text to prefill in the message input |
Discussion
Uses the top-most view controller of the UIApplicationDelegate as the presenting view controller with prefilled text in the message input.
+initWithSettings:completionHandler: must have been called prior to calling this method.
Declared In
BrandMessenger.h
+ close
Dismisses the BrandMessenger conversation, if shown.
+ (void)closeDiscussion
Note: If a view controller was created and presented using newConversationViewController, calling this method will have no effect.
+initWithSettings:completionHandler: must have been called prior to calling this method.
Declared In
BrandMessenger.h
+ destroy
Destroys the BrandMessenger SDK
+ (void)destroyDiscussion
BrandMessenger is automatically terminated when the application exits. This method does not need to be called manually
Declared In
BrandMessenger.h
+ showConversationFromViewController:
Presents the BrandMessenger conversation screen, using the given view controller as presenting view controller.
+ (void)showConversationFromViewController:(UIViewController *)viewControllerDiscussion
In most cases, it is better to use +show. If you need more fine-grained control over which view controller is used as presenting view controller, use this method instead.
+initWithSettings:completionHandler: must have been called prior to calling this method.
Declared In
BrandMessenger.h
+ showConversationWithId:fromViewController:
Loads the conversation specified by the ID, and presents the BrandMessenger conversation screen, using the given view controller as presenting view controller.
+ (void)showConversationWithId:(NSString *)conversationId fromViewController:(UIViewController *)viewControllerParameters
conversationId |
The ID of the conversation to load |
|---|---|
viewController |
The view controller to use as the presenting view controller |
Discussion
In most cases, it is better to use +show. If you need more fine-grained control over which view controller is used as presenting view controller, use this method instead.
+initWithSettings:completionHandler: must have been called prior to calling this method.
Declared In
BrandMessenger.h
+ showConversationFromViewController:withStartingText:
Presents the BrandMessenger conversation screen, using the given view controller as presenting view controller with prefilled text in the message input.
+ (void)showConversationFromViewController:(UIViewController *)viewController withStartingText:(nullable NSString *)startingTextDiscussion
In most cases, it is better to use +show. If you need more fine-grained control over which view controller is used as presenting view controller, use this method instead.
+initWithSettings:completionHandler: must have been called prior to calling this method.
Declared In
BrandMessenger.h
+ showConversationWithId:fromViewController:andStartingText:
Loads the conversation specified by the ID, and presents the BrandMessenger conversation screen, using the given view controller as presenting view controller with prefilled text in the message input.
+ (void)showConversationWithId:(NSString *)conversationId fromViewController:(UIViewController *)viewController andStartingText:(nullable NSString *)startingTextParameters
conversationId |
The ID of the conversation to load |
|---|---|
viewController |
The view controller to use as the presenting view controller |
startingText |
The text to prefill in the message input |
Discussion
In most cases, it is better to use +show. If you need more fine-grained control over which view controller is used as presenting view controller, use this method instead.
+initWithSettings:completionHandler: must have been called prior to calling this method.
Declared In
BrandMessenger.h
+ newConversationViewController
Creates and returns a BrandMessenger conversation view controller.
+ (nullable UIViewController *)newConversationViewControllerReturn Value
A new instance of the BrandMessenger conversation view controller class. Returns nil if +initWithSettings:completionHandler: hasn’t been called
Discussion
You may use this view controller to embed the conversation in a navigation controller, to change the modal presentation style, or display it in any way you choose.
A view controller created in this way is tied to the current user’s conversation at creation time. If the current user changes (i.e. by calling +login:jwt:completionHandler: or +logoutWithCompletionHandler:), the view controller is invalidated and must be recreated for the new user.
Note: It is the responsibility of the caller to show, hide, and maintain a reference to this view controller. Calling close will not dismiss a view controller created in this way.
Declared In
BrandMessenger.h
+ newConversationViewControllerWithId:completionHandler:
Creates and returns a BrandMessenger conversation view controller, loading the conversation specified by the ID
+ (void)newConversationViewControllerWithId:(NSString *)conversationId completionHandler:(nullable void ( ^ ) ( NSError *_Nullable error , UIViewController *_Nullable viewController ))handlerParameters
conversationId |
The ID of the conversation to load |
|---|---|
handler |
Completion handler which provides a UIViewController with the conversation loaded by the specified ID |
Discussion
You may use this view controller to embed the conversation in a navigation controller, to change the modal presentation style, or display it in any way you choose.
Note: It is the responsibility of the caller to show, hide, and maintain a reference to this view controller. Calling close will not dismiss a view controller created in this way.
Declared In
BrandMessenger.h
+ newConversationViewControllerWithStartingText:
Creates and returns a BrandMessenger conversation view controller with prefilled text in the message input.
+ (nullable UIViewController *)newConversationViewControllerWithStartingText:(nullable NSString *)startingTextReturn Value
A new instance of the BrandMessenger conversation view controller class. Returns nil if +initWithSettings:completionHandler: hasn’t been called
Discussion
You may use this view controller to embed the conversation in a navigation controller, to change the modal presentation style, or display it in any way you choose. The message input will be prefilled with the given startingText
A view controller created in this way is tied to the current user’s conversation at creation time. If the current user changes (i.e. by calling +login:jwt:completionHandler: or +logoutWithCompletionHandler:), the view controller is invalidated and must be recreated for the new user.
Note: It is the responsibility of the caller to show, hide, and maintain a reference to this view controller. Calling close will not dismiss a view controller created in this way.
Declared In
BrandMessenger.h
+ newConversationViewControllerWithId:startingText:completionHandler:
Creates and returns a BrandMessenger conversation view controller with prefilled text in the message input, loading the conversation specified by the ID
+ (void)newConversationViewControllerWithId:(NSString *)conversationId startingText:(nullable NSString *)startingText completionHandler:(nullable void ( ^ ) ( NSError *_Nullable error , UIViewController *_Nullable viewController ))handlerParameters
conversationId |
The ID of the conversation to load |
|---|---|
startingText |
The text to prefill in the message input |
handler |
Completion handler which provides a UIViewController with the conversation loaded by the specified ID |
Discussion
You may use this view controller to embed the conversation in a navigation controller, to change the modal presentation style, or display it in any way you choose. The message input will be prefilled with the given startingText
Note: It is the responsibility of the caller to show, hide, and maintain a reference to this view controller. Calling close will not dismiss a view controller created in this way.
Declared In
BrandMessenger.h
+ showConversationList
Presents the BrandMessenger conversation list screen.
+ (void)showConversationListDiscussion
Uses the top-most view controller of the UIApplicationDelegate as the presenting view controller.
+initWithSettings:completionHandler: must have been called prior to calling this method.
Declared In
BrandMessenger.h
+ showConversationListWithoutCreateConversationButton
Presents the BrandMessenger conversation list screen without a create conversation button
+ (void)showConversationListWithoutCreateConversationButtonDiscussion
Uses the top-most view controller of the UIApplicationDelegate as the presenting view controller.
+initWithSettings:completionHandler: must have been called prior to calling this method.
Declared In
BrandMessenger.h
+ closeConversationList
Dismisses the BrandMessenger conversation list, if shown.
+ (void)closeConversationListDiscussion
Note: If a view controller was created and presented using newConversationViewController, calling this method will have no effect.
+initWithSettings:completionHandler: must have been called prior to calling this method.
Declared In
BrandMessenger.h
+ showConversationListFromViewController:
Presents the BrandMessenger conversation list screen, using the given view controller as presenting view controller.
+ (void)showConversationListFromViewController:(UIViewController *)viewControllerDiscussion
In most cases, it is better to use +show. If you need more fine-grained control over which view controller is used as presenting view controller, use this method instead.
+initWithSettings:completionHandler: must have been called prior to calling this method.
Declared In
BrandMessenger.h
+ showConversationListFromViewControllerWithoutCreateConversationButton:
Presents the BrandMessenger conversation list screen without a create conversation button, using the given view controller as presenting view controller.
+ (void)showConversationListFromViewControllerWithoutCreateConversationButton:(UIViewController *)viewControllerDiscussion
In most cases, it is better to use +show. If you need more fine-grained control over which view controller is used as presenting view controller, use this method instead.
+initWithSettings:completionHandler: must have been called prior to calling this method.
Declared In
BrandMessenger.h
+ newConversationListViewController
Creates and returns a BrandMessenger conversation list view controller.
+ (nullable UIViewController *)newConversationListViewControllerReturn Value
A new instance of the BrandMessenger conversation view controller class. Returns nil if +initWithSettings:completionHandler: hasn’t been called
Discussion
You may use this view controller to embed the conversation in a navigation controller, to change the modal presentation style, or display it in any way you choose.
A view controller created in this way is tied to the current user’s conversation at creation time. If the current user changes (i.e. by calling +login:jwt:completionHandler: or +logoutWithCompletionHandler:), the view controller is invalidated and must be recreated for the new user.
Note: It is the responsibility of the caller to show, hide, and maintain a reference to this view controller. Calling close will not dismiss a view controller created in this way.
Declared In
BrandMessenger.h
+ newConversationListViewControllerWithoutCreateConversationButton
Creates and returns a BrandMessenger conversation list view controller without a create conversation button.
+ (nullable UIViewController *)newConversationListViewControllerWithoutCreateConversationButtonReturn Value
A new instance of the BrandMessenger conversation view controller class. Returns nil if +initWithSettings:completionHandler: hasn’t been called
Discussion
You may use this view controller to embed the conversation in a navigation controller, to change the modal presentation style, or display it in any way you choose.
A view controller created in this way is tied to the current user’s conversation at creation time. If the current user changes (i.e. by calling +login:jwt:completionHandler: or +logoutWithCompletionHandler:), the view controller is invalidated and must be recreated for the new user.
Note: It is the responsibility of the caller to show, hide, and maintain a reference to this view controller. Calling close will not dismiss a view controller created in this way.
Declared In
BrandMessenger.h
+ setConversationListDelegate:
Sets the conversation list delegate
+ (void)setConversationListDelegate:(nullable id<KBMConversationListDelegate>)delegateParameters
delegate |
Can we an object conforming to KBMConversationListDelegate, or NULL, which would remove any existing delegate |
|---|
Discussion
The conversation list delegate is used to respond to events relating to the conversation list
See Also
Declared In
BrandMessenger.h
+ setUserFirstName:lastName:
Sets the current user’s first and last name to be used as a display name when sending messages.
+ (void)setUserFirstName:(nullable NSString *)firstName lastName:(nullable NSString *)lastNameParameters
firstName |
The first name of the user |
|---|---|
lastName |
The last name of the user |
Discussion
This is a shortcut for -setFirstName and -setLastName on [KBMUser currentUser]
See Also
Declared In
BrandMessenger.h
+ conversation
Accessor method for the current conversation.
+ (nullable KBMConversation *)conversationReturn Value
Current conversation, or nil if +initWithSettings:completionHandler: hasn’t been called yet.
See Also
Declared In
BrandMessenger.h
+ conversationById:completionHandler:
Get a conversationById. This is an asynchronous call and requires a callback to retrieve the result.
+initWithSettings:completionHandler: must have been called prior to calling this method.
+ (void)conversationById:(NSString *)conversationId completionHandler:(nullable void ( ^ ) ( NSError *_Nullable error , KBMConversation *_Nullable conversation ))handlerParameters
conversationId |
the conversationId |
|---|
See Also
Declared In
BrandMessenger.h
+ login:jwt:completionHandler:
Logs in a new BrandMessenger user.
+ (void)login:(NSString *)externalId jwt:(NSString *)jwt completionHandler:(nullable void ( ^ ) ( NSError *_Nullable error , NSDictionary *_Nullable userInfo ))handlerParameters
externalId |
The distinct id of the user to login. Must not be nil. |
|---|---|
jwt |
jwt used to prove the origin of the login request. Must not be nil. |
Discussion
You can either use this method to transition from logged out state to logged in, or to switch the currently logged in user to a different one.
User login state is persisted across app launches. You must call +logoutWithCompletionHandler: to reset to anonymous mode.
+initWithSettings:completionHandler: must have been called prior to calling this method.
You may not call login while the conversation screen is shown. Doing so will result in a no-op.
Declared In
BrandMessenger.h
+ logoutWithCompletionHandler:
Logs out the current user.
+ (void)logoutWithCompletionHandler:(nullable void ( ^ ) ( NSError *_Nullable error , NSDictionary *_Nullable userInfo ))completionHandlerDiscussion
Calling this method while already in anonymous state has no effect.
You may not call logout while the conversation screen is shown. Doing so will result in a no-op.
Declared In
BrandMessenger.h
+ startConversationWithCompletionHandler:
Force-start a conversation for the current user (Deprecated: use + createConversationWithName:description:iconUrl:metadata:completionHandler instead)
+ (void)startConversationWithCompletionHandler:(nullable void ( ^ ) ( NSError *_Nullable error , NSDictionary *_Nullable userInfo ))completionHandlerDiscussion
Creates a user and conversation on the server, allowing the business to reach out proactively to the user via the public API.
It is strongly recommended to only call this method in the case where a message is likely to be sent.
This method is called automatically when starting a conversation via the -sendMessage: or -sendImage:withProgress:completion: methods, or when a user sends a message via the conversation view controller.
Declared In
BrandMessenger.h
+ createConversationWithName:description:iconUrl:avatarUrl:metadata:message:completionHandler:
Create a conversation for the current user, optionally sending a message of type text as part of the conversation creation
+ (void)createConversationWithName:(nullable NSString *)displayName description:(nullable NSString *)description iconUrl:(nullable NSString *)iconUrl avatarUrl:(nullable NSString *)avatarUrl metadata:(nullable NSDictionary *)metadata message:(nullable NSArray<KBMMessage*> *)message completionHandler:(nullable void ( ^ ) ( NSError *_Nullable error , NSDictionary *_Nullable userInfo ))completionHandlerParameters
displayName |
A user-friendly name to label the conversation in the list (max length 100 characters) |
|---|---|
description |
A string describing the purpose of the conversation (max length 100 characters) |
iconUrl |
An iconUrl to display in the conversation list |
avatarUrl |
An avatarUrl that is associated with the current user |
metadata |
A flat JSON Object that can only contain the following value types: string, number, boolean and null |
message |
An array containing a single KBMMessage type, to be sent as part of conversation creation. Only a message of type text can be sent as part of conversation creation. Multiple messages, or other types (e.g files, attachments) will cause this method to return an error. |
completionHandler |
An optional block to evaluate the result of the operation |
Discussion
Creates a user and conversation on the server, allowing the business to reach out proactively to the user via the public API.
Creating a conversation via this method will count as an active user conversation (AUC) whether messages are exchanged or not, which may incur cost based on your plan. It is strongly recommended to only call this method in the case where a message is likely to be sent.
This method is called automatically when starting a conversation via the -sendMessage: or -sendImage:withProgress:completion: methods, or when a user sends a message via the conversation view controller.
Note: Only a single message of type text can be sent as part of conversation creation. Multiple messages, or other types (e.g files, attachments) will cause this method to return an error.
Declared In
BrandMessenger.h
+ updateConversationById:withName:description:iconUrl:metadata:completionHandler:
Updates the specified conversation for the current user.
+initWithSettings:completionHandler: must have been called prior to calling this method.
If the displayName, description, iconUrl, and metadata parameters are all nil, this is a no-op.
+ (void)updateConversationById:(NSString *)conversationId withName:(nullable NSString *)displayName description:(nullable NSString *)description iconUrl:(nullable NSString *)iconUrl metadata:(nullable NSDictionary *)metadata completionHandler:(nullable void ( ^ ) ( NSError *_Nullable error , NSDictionary *_Nullable userInfo ))completionHandlerParameters
conversationId |
the conversationId |
|---|---|
displayName |
A user-friendly name to label the conversation (max length 100 characters) |
description |
A string describing the purpose of the conversation (max length 100 characters) |
iconUrl |
An iconUrl to display in the conversation list |
metadata |
A flat JSON Object that can only contain the following value types: string, number, boolean and null |
completionHandler |
An optional block to evaluate the result of the operation |
See Also
Declared In
BrandMessenger.h
+ setConversationInputDisplayed:
Toggles whether the input bar is displayed on the conversation view.
+ (void)setConversationInputDisplayed:(BOOL)displayedDiscussion
For some use cases, it can be useful to remove the ability for the user to craft their own messages. For example, if your conversation flow relies solely on postback buttons or quick replies, you may not want to allow the user to send anything other than the presented options.
Passing NO to this method will hide the input bar entirely, including the media button and the text area, thus preventing the user from sending messages themselves.
This method may be called at any time, even when the conversation view is currently displayed.
State is persisted across view controller launches.
Declared In
BrandMessenger.h
+ setPushToken:
Set the push notification token for this device.
+ (void)setPushToken:(NSData *)tokenDiscussion
This method is called automatically if KBMSettings.enableAppDelegateSwizzling is set to YES.
See Also
Declared In
BrandMessenger.h
+ handlePushNotification:
Handle an incoming push notification.
+ (void)handlePushNotification:(NSDictionary *)userInfoDiscussion
Call this method in your -application:didReceiveRemoteNotification: or -application:didReceiveRemoteNotification:fetchCompletionHandler: callback, passing the userInfo dictionary.
If the push notification did not originate from BrandMessenger, this is a no-op.
This method is called automatically if KBMSettings.enableAppDelegateSwizzling is set to YES.
See Also
Declared In
BrandMessenger.h
+ userNotificationCenterDelegate
An object conforming to UNUserNotificationCenterDelegate protocol, used to handle notifications on iOS 10 and above.
+ (nullable id<UNUserNotificationCenterDelegate>)userNotificationCenterDelegateReturn Value
An object conforming to UNUserNotificationCenterDelegate protocol, or nil if +initWithSettings:completionHandler: hasn’t been called yet.
Discussion
Implements both methods of UNUserNotificationCenterDelegate.
By default this object will automatically be set as the UNUserNotificationCenter delegate at init time. BrandMessenger will maintain a reference to your app’s existing delegate (if applicable), and automatically forward any calls for notifications that did not originate from BrandMessenger.
To disable automatic overriding, you must set KBMSettings.enableUserNotificationCenterDelegateOverride to NO before calling +initWithSettings:completionHandler:. If you choose to do so, you must manually forward any relevant calls from your own delegate object. To check the origin of a notification, see the documentation for KBMPushNotificationIdentifier. For example:
-(void)userNotificationCenter:(UNUserNotificationCenter )center willPresentNotification:(UNNotification )notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler { if(notification.request.content.userInfo[KBMPushNotificationIdentifier] != nil){ [[BrandMessenger userNotificationCenterDelegate] userNotificationCenter:center willPresentNotification:notification withCompletionHandler:completionHandler]; return; } }
-(void)userNotificationCenter:(UNUserNotificationCenter )center didReceiveNotificationResponse:(UNNotificationResponse )response withCompletionHandler:(void (^)())completionHandler { if(response.notification.request.content.userInfo[KBMPushNotificationIdentifier] != nil){ [[BrandMessenger userNotificationCenterDelegate] userNotificationCenter:center didReceiveNotificationResponse:response withCompletionHandler:completionHandler]; return; } }
See Also
Declared In
BrandMessenger.h
+ handleUserNotificationActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler:
Handle the user input from a reply type notification action.
+ (void)handleUserNotificationActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void ( ^ ) ( void ))completionHandlerDiscussion
Call this method in your -application:handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler:, passing the action identifier, userInfo dictionary, responseInfo dictionary, and completionHandler callback.
This method will post a message on behalf of the user, with the contents of their inline reply. When the message upload completes (either in success or failure), the completion handler will be called.
If the action identifier does not match KBMUserNotificationReplyActionIdentifier, the completion handler will be called immediately and the notification will be ignored.
This method is called automatically if KBMSettings.enableAppDelegateSwizzling is set to YES.
See Also
Declared In
BrandMessenger.h
+ handleUserNotificationActionWithIdentifier:withResponseInfo:completionHandler:
Handle the user input from a reply type notification action. (Deprecated: use +handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler: instead.)
+ (void)handleUserNotificationActionWithIdentifier:(NSString *)identifier withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void ( ^ ) ( void ))completionHandlerDiscussion
Call this method in your -application:handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler:, passing the action identifier, responseInfo dictionary, and completionHandler callback.
This method will post a message on behalf of the user, with the contents of their inline reply. When the message upload completes (either in success or failure), the completion handler will be called.
If the action identifier does not match KBMUserNotificationReplyActionIdentifier, the completion handler will be called immediately and the notification will be ignored.
This method is called automatically if KBMSettings.enableAppDelegateSwizzling is set to YES.
See Also
Declared In
BrandMessenger.h
+ userNotificationCategories
A set of categories used for handling and displaying BrandMessenger user notification actions.
+ (NSSet *)userNotificationCategoriesDiscussion
On iOS 8, returns an empty set.
On iOS 9, returns a set of UIUserNotificationCategory objects, to be used with UIUserNotificationSettings +settingsForTypes:categories:
On iOS 10, returns a set of UNNotificationCategory objects, to be used with UNUserNotificationCenter -setNotificationCategories:
Categories are registered automatically if KBMSettings.requestPushPermissionOnFirstMessage is set to YES. If automatic registration is disabled, you must make sure to include the BrandMessenger categories in your calls to the above mentioned methods.
See Also
Declared In
BrandMessenger.h
+ loadConversation:completionHandler:
Loads a conversation by its ID and sets it as the active conversation for the current session.
+ (void)loadConversation:(NSString *)conversationId completionHandler:(nullable void ( ^ ) ( NSError *_Nullable error , NSDictionary *_Nullable userInfo ))completionHandlerDiscussion
When called, subscribes the current device for push notifications on the passed conversationId, and sets the SDK to send and receive messages for that conversation going forward. Does not unsubscribe for notification on previously loaded conversations.
If the conversation is already set to the passed ID, this call is a no-op.
Declared In
BrandMessenger.h
+ getConversations:
Returns a list of conversations from storage.
+ (void)getConversations:(void ( ^ ) ( NSError *_Nullable , NSArray *_Nullable ))completionHandlerDiscussion
Returns a list of KBMConversation objects from storage.
Declared In
BrandMessenger.h
+ updateConversationDelegate:
Updating the conversation delegate
+ (void)updateConversationDelegate:(id<KBMConversationDelegate>)delegateDiscussion
when called, a new delegate is set
Declared In
BrandMessenger.h
+ getMoreConversations:
Loads a list of conversations
+ (void)getMoreConversations:(void ( ^ ) ( NSError *_Nullable ))completionHandlerDiscussion
Retrives the next 10 conversations from the server, and stores them.
Declared In
BrandMessenger.h
+ hasMoreConversations
A boolean representing if the server has more conversations to load for the user, to support pagination.
+ (BOOL)hasMoreConversationsDiscussion
When called, returns a boolean indicating if the server has more conversations to load for the user.
Declared In
BrandMessenger.h