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 the App ID to be initialized. The Integration ID can be found in the Sunshine Conversations dashboard when connecting an iOS 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)

    1. 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;
    2. Class SKTConfig.h
      • Constructor - (instancetype)initWithAppId:(NSString *)appId replaced with - (instancetype)initWithIntegrationId:(NSString *)integrationId;
    3. Class SKTMessage.h
      • property (readonly) BOOL isFromCurrentUser changed to @property (nonatomic) BOOL isFromCurrentUser
    4. Class SKTConversation.h
      • NSDate *appMakerLastRead is now _Nullable

    API Additions

    1. Class SKTSettings.h
      • Added property NSString *integrationId
    2. Class SKTConfig.h
      • added property NSString *appName.
      • added read-only property NSString *integrationId.
    3. 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;
    4. Class SKTConversation.h
      • Added property NSDate *lastUpdatedAt
      • Added readonly property NSString *displayName
      • Added readonly property NSArray *participants
      • Add conformity to NSSecureCoding
    5. Class SKTMessage.h
      • Add conformity to NSSecureCoding
    6. Protocol SKTConversationDelegate
      • Added - (void)conversationListDidRefresh:(NSArray<SKTConversation *> *)conversationList;
    7. SKTConversationActivity.h
      • Added @property(readonly, nullable) NSString *conversationId
      • Added @property(readonly, nullable) NSString *appUserId;
    8. Class SKTParticipant.h
      • New class that represents participants in a conversation.