# iOS SDK - Changelog

## v3.21.0
- Fixed an issue that prevented the chat header image from displaying when the audio/video feature was disabled or when the chat-only version of the SDK was integrated into the app.

## v3.20.1
- Updated signing certificate for Xcode validation

## v3.20.0
- Fixed an issue where disabling the file transfer feature in code wasn't handled correctly by the SDK when the agent was a bot.
- Fixed the display of the interaction script bot's avatar.

## v3.19.0
- Added the new VivochaSDK_Notif_Contact_ChatViewMinimized notification to inform the developer when the chat view is minimized.

## v3.18.0
- Implemented a workaround to prevent the OnPersistence event from being called for an already closed conversation. (21679)

## v3.17.0
- Resolved an issue where users were unable to write messages when an outbound contact was initiated by the agent without any accompanying messages.

## v3.16.0
- Removed shared framework symbols erroneously added to the VivochaSDK binary, resolving a duplicated symbols error.

## v3.15.0
- Starting this version, when the SDK resumes a contact from a conversation will use the same VVCU that created the contact.

## v3.14.1
- Implemented a workaround to address an issue encountered during Archive validation with Xcode 15.3, which erroneously indicates that the SDK does not support the Minimum OS Version specified by the application. This was mitigated by temporarily setting the MinimumOS version to 100.0. Please note that this workaround is temporary and will be removed in a future release.

## v3.14.0
- Introduced the Apple Privacy manifest file for both VivochaSDK and its shared frameworks. To ensure accurate Privacy Report generation by Xcode after the Archive command, it's essential to update the `VivochaSDK.xcframework` entry in your app project settings' "General" tab > "Frameworks, Libraries, and Embedded Content" section, changing it from "Do Not Embed" to "Embed & Sign".
- Enabled digital signature for the `VivochaSDK.xcframework`, allowing you to verify the signature directly in the File inspector.

## v3.13.0
- Customers can now seamlessly continue their conversations even when the agent is offline (19963).
- Resolved a modifier issue in the VivochaTheme header file.

## v3.12.0
- Resolved an issue related to receiving attachments with null reference IDs. (18605)

## v3.11.0
- Fixed an issue when receiving attachments without description while the app is in background.

## v3.10.0
- Fixed an issue that prevented bot messages with a template from sending a read receipt (18334)
- Added management for a new event, "ScreenshotEnded," which can be triggered from the Agent Desktop when the agent has ended viewing the customer's screen during a contact. This action hides the "You are sharing your screen" banner in the customer-side chat view (18415)
- Introduced a new Vivocha start method with an optional VivochaOptions parameter. This feature allows the Vivocha SDK to remain in standby mode (downloading only the remote configuration) until the customer token is set, provided that a WAIT_UNTIL_TOKEN_IS_SET value is assigned to the WAIT_FOR_TOKEN option. Here is an example of usage:
     ```
     [Vivocha startWithAccountID:@"my_acctid"
                    andServID:@"my_serviceid"
                   andOptions:[VivochaOptions fromBuilder:^(VivochaOptionsBuilder *builder) {
           [builder setOption:WAIT_FOR_TOKEN withNumber:WAIT_UNTIL_TOKEN_IS_SET];
     }]];
     ```
- Aligned the behavior for when the contact ends on both iOS and Android versions of the SDK (#12743)
- Updated the banner string during a screenshot session from "Agent can see your screen" to "You are sharing your screen" for improved user-friendliness. The translation for all supported languages has been updated, while the translation key (VivochaSDK_String_UI_Media_Screenshot_Session_Active_Message) remains unchanged.

## v3.9.1
- Fixed Vivocha.setContactColor method when it is called before the Vivocha.start
- Rebuilt libidn.xcframework to match minimum version with the Vivocha SDK

## v3.9.0
- The media buttons now follow the campaign configuration for media.
- VivochaSDK_Notif_Contact_Terminated, VivochaSDK_Notif_Contact_UserDidTerminateChatView and VivochaSDK_Notif_Contact_ReceivedTerminationEventFromOtherPeer are now fired when the user explicitly closes the contact pressing the End button in the chat view.

## v3.8.0
- Exposed media object on Vivocha Contact
- Vivocha set_token endpoint is now called only if push notifications are enabled in the Campaign. (ticket #12616)

## v3.7.0
- Media buttons are now always visible while there is a call in progress. (ticket #12604)
- Mute button is now available during a call. (11117)
- When the Agent requests one or more screenshots, a message to notify the user is now shown in the Chat view. (10370)
- Updated WebRTC to version M109.
- Dropped support for bitcode.

## v3.6.0
- Added Documents/Files flow when sending an attachment. (10694)
- Better permissions management for camera and microphone when using audio and video calls. (8433)
- Fixed an issue with media rejection when the timeout arrived.
- Added MediaAvailability to local capabilities.

## v3.5.4
- Added method used by Cordova/Ionic plugin

## v3.5.3
- Fix wrong parsing on timestamp for bot messages

## v3.5.2
- Attachments are now correctly included in unread messages count (12595)
- Fixed an issue that prevented the attachment to be acked as read (8890)
- Fixed an issue that marked read messages not received by the customer when minimizing the chat (12673)
- Adding recurring operations for conversation check, media availability check and widget logging is now thread-safe (12852)

## v3.5.1
- Fixed the parsing code for the Customer Token JWT payload.

## v3.5.0
- Local notifications for received messages is now fired after the storage has managed the message. (11890)
- Contact object now exposes the External Customer Id if it was created using a CustomerToken (11471)
- Fixes on unread messages count (11891)

## v3.4.2
- Enabled attachment button while the contact is being managed by the Interaction Engine

## v3.4.1
- Same as 3.4.0 but with Bitcode enabled.

## v3.4.0
- *** BREAKING CHANGE ***
    The name of one of the events which can be fired by the VivochaSDK has changed from VivochaSDK_Notif_ContactResumed 
    to VivochaSDK_Notif_OnPersistence in order to extend its usage also for Conversation management. (11686)

    ```
    /**
        This is fired when a persistence from local or remote has been performed.
        The remote persistence can only happen when a Customer Token is set.
        In this case, if there is an active Conversation it will be returned and if it has an active contact,
        it is also resumed and the didResumeContactFromConversation boolean is set to true.
        If a local persistence has been performed, the didResumeContactFromConversation will be set to false.
        @param conversation                 the resumed conversation
        @param currentContact               the resumed contact, if any
        @param didResumeFromConversation    true if it was resumed from a conversation.
    */
    static NSString *VivochaSDK_Notif_OnPersistence = @"VivochaSDK_Notif_OnPersistence";

    ```

- Fixed the timeout behaviour for both sent and received media offers (11142, 11143)
- Fixed media offer rejection message when the reject comes from the agent (11137)
- Restored UI state when minimizing the chat view while waiting for the agent to answer a media offer (11095)
- When setting different CustomerTokens during the same session the VVCU is now reset correctly if needed. (11471 and 11558) 

## v3.3.0
- Fixed an issue on local contact persistence. 

## v3.2.4
- Fixed an issue that prevented the Agent availability to be notified if a Customer Token is set but there are no active conversations.

## v3.2.3
- Added a new handler to enable the developer to manage tapped links inside the chat view.

## v3.2.2
- It is now possible to set the secure flag in a Data Collection field.

## v3.2.1
- Fixed an issue that prevented a interaction script "prompt" block to work as intended

## v3.2.0
- Added support for iOS 15
- Added an option on Vivocha Theme to disable the Chat View navigation bar translucency on iOS versions prior to 15.

## v3.1.1
- Added an option on Vivocha Theme to disable the Chat View navigation bar translucency on iOS versions prior to 15. 
- Built with Xcode 12

## v3.1.0
- Updated AFNetworking to version 4.0.2 and MBProgressHUD to version 1.2.0

## v3.0.2
- Fixes a compatibility issue with campaigns that have the "enable conversations" setting turned off.

## v3.0.1
- Fixes an issue that prevented some contacts to be resumed from an active conversation.

## v3.0.0
- Added Conversations support. When a customer token is set, it resumes the active contact in the conversation and also loads the previous contacts' transcript.
- Added new theme options to show received and read receipts under message bubbles - the default value is: "disabled"
- Added new notification event for the resume of a contact: `VivochaSDK_Notif_ContactResumed`. Its payload will contain, among the others, information about the contact being resumed from a conversation or not.
- Added new API to send a READ ack for a given messageId in the `VivochaContact` class: `sendReadReceiptForMessageId:`. 
- Added new notification events for send/receive message acks. `VivochaSDK_Notif_Contact_ReceivedAckMessage` and `VivochaSDK_Notif_Contact_SentAckMessageResult`. Its payload will be a `VivochaChatAck` object.

## v2.8.2
- Updated AFNetworking dependency

## v2.8.1
- Fixes missing symbol for "chat" flavor.

## v2.8.0
- Added support for development on M1 Macs
- Added Set/Unset Customer Token APIs

## v2.7.1 
- Fixes on 'quick replies' and 'generic template' for bot messages.

## v2.7.0 BREAKING CHANGES!
- Added support for Xcode 12
- Migrated to XCFramework format. Check https://docs.vivocha.com/mobile-ios-integration-guide-swift?id=vivocha-ios-sdk-270-and-later 

## v2.6.9 (legacy branch)
- Fixes on 'quick replies' and 'generic template' for bot messages.

## v2.6.8
- Added the new VivochaSDK_Notif_Contact_UserDidTerminateChatView notification to notify the developer when the user has pressed the End button to close the chat view.

## v2.6.7
- Added a method to disable the chat view automatic restoring when the app is killed while the chat view is visible. (disableChatViewAutoRestoringOnAppKill)

## v2.6.6
- Removed the usage of insecure random number generation functions (Ticket #9265)

## v2.6.5
- In order to follow the web version behaviour, the body for Bot Messages is not shown when the payload contains a template.

## v2.6.4
- Exposed the contactId property on the VivochaContact class
- Set Deployment Target to iOS 10

## v2.6.3
- Fixed an issue that prevented the messages to be decrypted when the Encryption Level set on the Vivocha Console is End-to-End

## v2.6.2
- Fixed an issue that prevented the Chat View to start on iOS 9.3.5 (Ticket #8438)

## v2.6.1
- Added UI translation for Japanese, German and Spanish languages

## v2.6.0 BREAKING CHANGES!
- Added support for iOS 13. 
** In order to make the framework compatible with Xcode 11 we made some changes to the folder structure. 
** The Resources folder has been removed and all the content is now in the root folder of the framework. 
** The SharedFrameworks folder has moved to the root folder.
** **Please update all the references in your build settings and project tree.** 
- Updated WebRTC version

## v2.5.3
- Moved WebRTC back to the SharedFrameworks folder inside Resources for better compatibility with Xcode.
- Removed UIWebView usage from the VivochaBrowserViewControllerLegacy and the AFNetworking library.

## v2.5.2
- Fixed a UI misplacement when the NavigationBar translucency is disabled in the host app. 

## v2.5.1
- Moved WebRTC to Frameworks folder. If you already imported the WebRTC.framework folder inside your project you should remove the reference because it is now imported automatically when adding the VivochaSDK.framework
- Support to integrate the VivochaSDK inside a framework library. Please check out the documentation site for a tutorial.

## v2.5.0
- Added Bitcode support
- Updated WebRTC version
- Starting from this release, Vivocha can be imported with chat-only feature if you don't need multimedia capabilities.

## v2.4.5
- Added an additional Start method with a new "server" parameter.

## v2.4.4
- Fixed an issue that prevented the usage inside Swift projects.

## v2.4.3
- Fixed UI misplacements during videochat
- Fixed an issue on media upgrade/downgrade during a call
- Fixed chat bubbles width for Arabic text
- Forced LTR on the navigation bar as in the Android SDK

## v2.4.2
- Fixed the "Done" button misplacement in the attachment preview.

## v2.4.1
- Fixed an issue that prevented the speaker to be activated during a Video chat
