Smooch v9.0.0 Release Notes

Release Date: 2020-09-24 // over 3 years ago
  • 9.0.0

    ⚡️ This major version enhances the support for Multi-Conversations and introduces a new conversation list UI. We have also included updates to our conversation screen UI to show the conversation icon, conversation name and description. You can also configure your app to allow users to create multiple conversations from our conversation list screen. We've fixed a bug relating to JWT expiry which invokes an auth delegate required to refresh the JWT and reattempt connection.

    Behavior Changes

    Loading a Conversation

    You can now load a conversation specified by the ID and present the conversation screen.

    [Smooch showConversationWithId:@"your conversationId"];
    

    You can now load a conversation specified by the ID and present the conversation screen with prefilled text in the message input.

    [Smooch showConversationWithId:@"your conversationId" andStartingText:@"your starting text"];
    

    You can now load a conversation specified by the ID and present the conversation screen using the given view controller as presenting view controller.

    [Smooch showConversationWithId:@"your conversationId" fromViewController:[[YourViewController alloc] init]];
    

    You can now load a conversation specified by the ID and present the conversation screen with prefilled text in the message input using the given view controller as presenting view controller.

    [Smooch showConversationWithId:@"your conversationId" fromViewController:[[YourViewController alloc] init] andStartingText:@"your starting text"];
    

    Creating a Conversation View

    You can now create and return a Smooch conversation view controller loading the conversation specified by the ID.

    [Smooch newConversationViewControllerWithId:@"your conversationId" completionHandler:^(NSError * _Nullable error, UIViewController * _Nullable viewController) {
       if (error) {
           // handle error
        else {
           // handle success
       }
    }];
    

    You can now create and return a Smooch conversation view controller with prefilled text in the message input specified by the ID.

    [Smooch newConversationViewControllerWithId:@"your conversationId" startingText:@"your starting text" completionHandler:^(NSError * _Nullable error, UIViewController * _Nullable viewController) {
       if (error) {
           // handle error
       } else {
           // handle success
       }
    }];
    

    Conversation List

    You can now present the Smooch conversation list screen.

    [Smooch showConversationList];
    

    You can now present the Smooch conversation list screen without the create conversation button.

     [Smooch showConversationListWithoutCreateConversationButton];
    

    You can now dismiss the Smooch conversation list screen if shown.

     [Smooch closeConversationList];
    

    You can now present the Smooch conversation list screen, using the given view controller as presenting view controller.

    [Smooch showConversationListFromViewController:[[YourViewController alloc] init]];
    

    You can now present the Smooch conversation list screen without the create conversation button, using the given view controller as presenting view controller.

    [Smooch showConversationListFromViewControllerWithoutCreateConversationButton:[[YourViewController alloc] init]];
    

    You can create the conversation list view controller.

    [Smooch newConversationListViewController];
    

    You can now create the conversation list view controller without the create conversation button.

    [Smooch newConversationListViewControllerWithoutCreateConversationButton];
    

    ⚡️ You can now set the conversation list delegate to receive updates.

    [Smooch setConversationListDelegate:self];
    

    Creating a Conversation

    📇 You can now create a conversation for the current user with optional displayName, description, iconUrl, metadata and send a message of type text.

    [Smooch createConversationWithName:@"displayName" description:@"description" iconUrl:@"iconUrl" metadata:@{@"metadataKey": @"metadataValue"} message:@[[[SKTMessage alloc] initWithText:@"message"]] completionHandler:^(NSError * _Nullable error, NSDictionary * _Nullable userInfo) {
        if (error) {
            // handle error
        } else {
            // handle success
        }
    }];
    

    ⚡️ Updating a Conversation

    📇 You can now update a conversation for the current user with optional displayName, description, iconUrl and metadata.

    [Smooch updateConversationById:@"your conversationId" withName:@"displayName" description:@"description" iconUrl:@"iconUrl" metadata:@{@"metadataKey": @"metadataValue"} completionHandler:^(NSError * _Nullable error, NSDictionary * _Nullable userInfo) {
        if (error) {
            // handle error
        } else {
            // handle success
        }
    }];
    

    Loading Conversations

    You can now load a list of the next 10 conversations from the server.

    [self.conversationController getMoreConversations:^(NSError * error) {
        if (error) {
         // handle error
        } else {
         // handle success
        }
    }];
    

    👍 You can now support pagination with this boolean, representing if the server has more conversations to load for the user.

    [self.conversationController hasMoreConversations];
    

    API Changes (Breaking)

    • ⚡️ Updated the following SKTUser properties.
    • userId is now externalId
    • 📇 properties is now metadata
    • appUserId is now userId
    • ⚡️ Updated the following SKTConversation properties.
    • appUserId is now userId
    • appMakerLastRead is now businessLastRead
    • appMaker is now business
    • ⚡️ Updated the following SKTParticipant property for the participants included in the participants array
    • appUserId is now userId
    • ⚡️ Updated the following SKTMessage properties for the messages included in the messages array
    • authorId is now userId and will only be included for messages with role equals to user
    • name is now displayName

    API Additions

    1. Class Smooch.h
      • Added class method +(void)showConversationWithId:(NSString *)conversationId
      • Added class method +(void)showConversationWithId:(NSString *)conversationId andStartingText:(nullable NSString *)startingText
      • Added class method +(void)showConversationWithId:(NSString *)conversationId fromViewController:(UIViewController*)viewController;
      • Added class method +(void)showConversationWithId:(NSString *)conversationId fromViewController:(UIViewController*)viewController andStartingText:(nullable NSString *)startingText
      • Added class method +(void)newConversationViewControllerWithId:(NSString *)conversationId completionHandler:(nullable void(^)(NSError * _Nullable error, UIViewController * _Nullable viewController))handler
      • Added class method +(void)newConversationViewControllerWithId:(NSString *)conversationId startingText:(nullable NSString *)startingText completionHandler:(nullable void(^)(NSError * _Nullable error, UIViewController * _Nullable viewController))handler
      • Added class method +(void)showConversationList
      • Added class method +(void)showConversationListWithoutCreateConversationButton
      • Added class method +(void)closeConversationList
      • Added class method +(void)showConversationListFromViewController:(UIViewController*)viewController
      • Added class method +(void)showConversationListFromViewControllerWithoutCreateConversationButton:(UIViewController *)viewController
      • Added class method +(nullable UIViewController *)newConversationListViewController
      • Added class method +(nullable UIViewController *)newConversationListViewControllerWithoutCreateConversationButton
      • Added class method +(void)setConversationListDelegate:(nullable id<SKTConversationListDelegate>)delegate
      • Added class method +(void)createConversationWithName:(nullable NSString *)displayName description:(nullable NSString *)description iconUrl:(nullable NSString *)iconUrl metadata:(nullable NSDictionary *)metadata message:(nullable NSArray<SKTMessage *> *)message completionHandler:(nullable void(^)(NSError * _Nullable error, NSDictionary * _Nullable userInfo))completionHandler
      • Added class method +(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))completionHandler
      • Added class method + (void)getMoreConversations:(void (^)(NSError * _Nullable))completionHandler
      • Added class method + (BOOL)hasMoreConversations
    2. Class SKTSettings.h
      • Added property UIColor *conversationListAccentColor
    3. Added Protocol SKTConversationListDelegate
      • Added method shouldCreateCustomConversationFlow
      • Added method conversationListDidSelectCreateConversation

Previous changes from v8.0.2

  • 8.0.2

    🛠 Fixes

    • 🛠 Fixed a bug related to getConversations returning nil for metadata

    🚀 Release 8.0.0

    🚀 The full release notes of the latest major release of the SDK can be found here