Smooch v8.0.0 Release Notes
Release Date: 2020-04-16 // about 4 years ago-
8.0.0
๐ This major version enhances support for multi-conversations and introduces multi-party where conversations can now host multiple users messaging each other. Read about multi-party conversations on our guide.
Behavior Changes
๐ Initializing the SDK
๐ Version 8.0.0 of the SDK requires an
Integration ID
instead of theApp ID
to be initialized. TheIntegration ID
can be found in the Sunshine Conversations dashboard when connecting aniOS SDK
integration as a Customer Channel to your Sunshine Conversations App, or through the API.// before
SKTSettings \*settings = [SKTSettings settingsWithAppId:@"your App ID"]; [Smooch initWithSettings:settings completionHandler:^(NSError \* error, NSDictionary \* userInfo) { if (error != nil) { // handle error state } else { // handle successful initialization } }]
// after
SKTSettings \*settings = [SKTSettings settingsWithIntegrationId:@"your Integration ID"]; [Smooch initWithSettings:settings completionHandler:^(NSError \* error, NSDictionary \* userInfo) { if (error != nil) { // handle error state } else { // handle successful initialization } }];
Retrieving other Conversations
You can now retrieve the list of conversations for the current user.
[Smooch getConversations:^(NSError \*error, NSArray \*conversations) { if (error) { // handle error } else { // handle success } }];
You can also retrieve a conversation with an ID.
[Smooch loadConversation:@"your Conversation ID" completionHandler:^(NSError \* \_Nullable error, NSDictionary \* \_Nullable userInfo) { if (error) { // handle error } else { // handle success } }];
๐ New Multi-Party and Multi-Conversation Events
โก๏ธ
SKTConversationActivity.h
has been updated with new events./\*\* \* @abstract An activity type indicating that a participant of the conversation started typing a response. \*/extern NSString const \*SKTConversationActivityTypeTypingStart;/\*\* \* @abstract An activity type indicating that a participant of the conversation stopped typing a response. \*/extern NSString const \*SKTConversationActivityTypeTypingStop;/\*\* \* @abstract An activity type indicating that a participant of the conversation recently read the user message. \* \* This event type is triggered for the current user when the conversation is read on a different device. \*/extern NSString const \*SKTConversationActivityTypeConversationRead;/\*\* \* @abstract NEW: An activity type indicating that the current user has been added to a conversation. \*/extern NSString const \*SKTConversationActivityTypeConversationAdded;/\*\* \* @abstract NEW: An activity type indicating that current user was removed from a conversation. \*/extern NSString const \*SKTConversationActivityTypeConversationRemoved;/\*\* \* @abstract NEW: An activity type indicating that a new participant was added to a conversation the current user is part of. \*/extern NSSTring const \*SKTConversationActivityTypeParticipantAdded;/\*\* \* @abstract NEW: An activity type indicating that a participant was removed from a conversation the current user is part of. \*/extern NSString const \*SKTConversationActivityTypeParticipantRemoved;
API Changes (Breaking)
- Class
SKTSettings.h
- Class constructor
+ (instancetype)settingsWithAppId:(NSString*)appId;
replaced with+ (instancetype)settingsWithIntegrationId:(NSString *)integrationId;
. - Class constructor
+ (instancetype)settingsWithAppId:(NSString*)appId andAuthCode:(NSString*)authCode;
replaced with+ (instancetype)settingsWithIntegrationId:(NSString*)integrationId andAuthCode:(NSString *)authCode;
- Class constructor
- Class
SKTConfig.h
- Constructor
- (instancetype)initWithAppId:(NSString *)appId
replaced with- (instancetype)initWithIntegrationId:(NSString *)integrationId;
- Constructor
- Class
SKTMessage.h
- property
(readonly) BOOL isFromCurrentUser
changed to@property (nonatomic) BOOL isFromCurrentUser
- property
- Class
SKTConversation.h
NSDate *appMakerLastRead
is now _Nullable
API Additions
- Class
SKTSettings.h
- Added property
NSString *integrationId
- Added property
- Class
SKTConfig.h
- added property
NSString *appName
. - added read-only property
NSString *integrationId
.
- added property
- Class
Smooch.h
- Added method
+ (void)conversationById:(NSString *)conversationId completionHandler:(nullable void(^)(NSError * _Nullable error, SKTConversation * _Nullable conversation))handler;
- Added class method
+ (void)getConversations:(void (^)(NSError *_Nullable, NSArray *_Nullable))completionHandler;
- Added
+ (void)updateConversationDelegate:(id<SKTConversationDelegate>)delegate;
- Added method
- Class
SKTConversation.h
- Added property
NSDate *lastUpdatedAt
- Added readonly property
NSString *displayName
- Added readonly property
NSArray *participants
- Add conformity to
NSSecureCoding
- Added property
- Class
SKTMessage.h
- Add conformity to
NSSecureCoding
- Add conformity to
- Protocol
SKTConversationDelegate
- Added
- (void)conversationListDidRefresh:(NSArray<SKTConversation *> *)conversationList;
- Added
SKTConversationActivity.h
- Added
@property(readonly, nullable) NSString *conversationId
- Added
@property(readonly, nullable) NSString *appUserId;
- Added
- Class
SKTParticipant.h
- New class that represents participants in a conversation.
- Class