KBMSettings Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | KBMSettings.h |
+ settingsWithIntegrationId:
Initializes a settings object with the given integrationId.
+ (instancetype)settingsWithIntegrationId:(NSString *)integrationIdParameters
integrationId |
A valid integration id retrieved from the BrandMessenger web portal. |
|---|
Declared In
KBMSettings.h
+ settingsWithIntegrationId:andAuthCode:
Initializes a settings object with the given integration id and auth code.
+ (instancetype)settingsWithIntegrationId:(NSString *)integrationId andAuthCode:(NSString *)authCodeParameters
integrationId |
A valid integration id retrieved from the BrandMessenger web portal. |
|---|---|
authCode |
A valid auth code generated from the BrandMessenger API. |
Declared In
KBMSettings.h
appId
The app id corresponding to your application.
@property (nonatomic, copy) NSString *appIdDiscussion
App id can be retrieved from the BrandMessenger web portal
This value may only be set once, and must be set at init time.
Declared In
KBMSettings.h
integrationId
The integration id corresponding to your application.
@property (nonatomic, copy) NSString *integrationIdDiscussion
integration id can be retrieved from the BrandMessenger web portal
This value may only be set once, and must be set at init time.
Declared In
KBMSettings.h
authCode
The auth code being used to authenticate as an existing user.
@property (nonatomic, copy) NSString *authCodeDiscussion
Auth code can be retrieved from the BrandMessenger API
This value may only be set once, and must be set at init time.
Declared In
KBMSettings.h
region
The BrandMessenger region for this account.
@property (nonatomic, copy) NSString *regionDiscussion
Leave unspecified to use the default region (US). Set to “eu-1” to use the EU region.
Declared In
KBMSettings.h
conversationAccentColor
The accent color for the conversation screen.
@property (nonatomic, strong) UIColor *conversationAccentColorDiscussion
Used as the color of user message bubbles, as well as the color of the send button and text input caret.
The default value is #00B0FF.
Declared In
KBMSettings.h
conversationAccentColorDarkMode
The accent color for the conversation screen in Dark Mode.
@property (nonatomic, strong) UIColor *conversationAccentColorDarkModeDiscussion
Used as the color of user message bubbles, as well as the color of the send button and text input caret.
The default value is #00B0FF.
Declared In
KBMSettings.h
conversationListAccentColor
The accent color for the conversation list screen.
@property (nonatomic, strong) UIColor *conversationListAccentColorDiscussion
Used as the color of the create conversation button
The default value is #00B0FF.
Declared In
KBMSettings.h
carouselTextColor
The text color for carousels that appear in the conversation screen.
@property (nonatomic, strong) UIColor *carouselTextColorDiscussion
Used as the text color of the carousel text.
Declared In
KBMSettings.h
userMessageTextColor
The text color for user messages.
@property (nonatomic, strong) UIColor *userMessageTextColorDiscussion
Used as the text color of user message bubbles.
The default value is #FFFFFF.
Declared In
KBMSettings.h
userMessageTextColorDarkMode
The text color for user messages in Dark Mode.
@property (nonatomic, strong) UIColor *userMessageTextColorDarkModeDiscussion
Used as the text color of user message bubbles.
The default value is #FFFFFF.
Declared In
KBMSettings.h
conversationStatusBarStyle
The status bar style to use on the conversation screen.
@property UIStatusBarStyle conversationStatusBarStyleDiscussion
You should use this property if your app uses UIAppearance to style UINavigationBar, and your styling requires a specific status bar color.
The default value is UIStatusBarStyleDefault.
Declared In
KBMSettings.h
conversationStatusBarStyleDarkMode
The status bar style to use on the conversation screen in Dark Mode.
@property UIStatusBarStyle conversationStatusBarStyleDarkModeDiscussion
You should use this property if your app uses UIAppearance to style UINavigationBar, and your styling requires a specific status bar color.
The default value is UIStatusBarStyleDefault.
Declared In
KBMSettings.h
allowedMenuItems
The items to display in the conversation menu
@property (nonatomic, strong, nullable) NSArray<NSString*> *allowedMenuItemsDiscussion
Valid values are KBMMenuItemCamera, KBMMenuItemGallery, KBMMenuItemDocument and KBMMenuItemLocation
All options are displayed by default. Setting this value to nil or an empty array will hide the menu button
Declared In
KBMSettings.h
allowOfflineUsage
Allow sending messages from the conversation view when offline
@property BOOL allowOfflineUsageDiscussion
Setting this to YES allows the user to send messages even when the device is offline. It also prevents an network error banner from showing when offline. This setting only applies to the conversation view.
Note that messages that are sent while offline will fail to send and the message will display an option for the user to retry. When network connectivity is restored while app is in foreground, the failed messages will resend.
Declared In
KBMSettings.h
allowOfflineUsageInBackground
Allow failed offline messages to resend while app is in background
@property BOOL allowOfflineUsageInBackgroundDiscussion
Setting this to YES allows the application to detect network connectivity changes while in background and resend failed messages.
Note that allowOfflineUsage flag must also be set to YES, and the application needs to enable Background Location Updates.
Declared In
KBMSettings.h
notificationDisplayTime
Maximum number of seconds to display in-app notifications before dismissing.
@property NSUInteger notificationDisplayTimeDiscussion
Setting this value to 0 will cause notications to stay on-screen until the user acts on them.
The default value is 8.
Declared In
KBMSettings.h
enableAppDelegateSwizzling
Whether or not to swizzle app delegate methods for handling push notifications.
@property BOOL enableAppDelegateSwizzlingDiscussion
When set to YES, BrandMessenger will swizzle the following methods of your UIApplicationDelegate in order to automatically handle push notification receiving and registering, as well as user notification handling.
- -application:didRegisterForRemoteNotificationsWithDeviceToken:
- -application:didFailToRegisterForRemoteNotificationsWithError:
- -application:didReceiveRemoteNotification:
- -application:didReceiveRemoteNotification:fetchCompletionHandler:
- -application:handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler:
If set to NO, BrandMessenger will not perform swizzling. It is up to the app to handle BrandMessenger push notifications by doing the following:
- When a new push token is received in -application:didRegisterForRemoteNotificationsWithDeviceToken:, you must call BrandMessenger +setPushToken.
- In your -application:didReceiveRemoteNotification: or -application:didReceiveRemoteNotification:fetchCompletionHandler: callback, you must call BrandMessenger +handlePushNotification: with the passed userInfo dictionary.
- In your -application:handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler: callback, you must call BrandMessenger +handleUserNotificationActionWithIdentifier:withResponseInfo:completionHandler: with the correct parameters.
The default value is YES.
See Also
Declared In
KBMSettings.h
enableUserNotificationCenterDelegateOverride
Whether or not to automatically replace the application’s UNUserNotificationCenterDelegate at init time.
@property BOOL enableUserNotificationCenterDelegateOverrideDiscussion
For more information, see the +userNotificationCenterDelegate method of the BrandMessenger class.
If set to NO, the application must forward calls from its own UNUserNotificationCenterDelegate to BrandMessenger to ensure proper handling of notifications on iOS 10.
The default value is YES.
See Also
Declared In
KBMSettings.h
requestPushPermissionOnFirstMessage
Whether or not to request user notification privileges after the user sends their first message.
@property BOOL requestPushPermissionOnFirstMessageDiscussion
If your app has a preferred time to request user notification privileges, set this to NO.
If set to NO, the application must make sure to register the BrandMessenger user notification category settings. For more information, see the +userNotificationCategories method of the BrandMessenger class.
The default value is YES.
See Also
Declared In
KBMSettings.h
authenticationDelegate
Delegate that will be notified of authentication related events
@property (weak, nonatomic, nullable) id<KBMAuthenticationDelegate> authenticationDelegateDiscussion
This delegate is useful if your app uses expiring tokens for your users. This way you can renew an invalid jwt when needed without having to call +login:jwt:completionHandler. May be nil
This value may only be set once, and must be set at init time.
See Also
Declared In
KBMSettings.h