# Changelog: Twilio Chat iOS SDK

> \[!CAUTION]
>
> Programmable Chat has been deprecated and is no longer supported. Instead, we'll be focusing on the next generation of chat: Twilio Conversations. Find out more about the [EOL process here](https://www.twilio.com/en-us/changelog/programmable-chat-end-of-life-notice).
>
> If you're starting a new project, please visit the [Conversations Docs](/docs/conversations) to begin. If you've already built on Programmable Chat, please visit our [Migration Guide](/docs/conversations/migrating-chat-conversations) to learn about how to switch.

## Latest release: 5.0.1

We recommend referencing the links below in your projects. As we patch bugs, these links will automatically be updated with fixes.

* **CocoaPods** `pod 'TwilioChatClient', '~> 5.0.1'`
* **Swift Package Manager** `https://github.com/twilio/twilio-chat-ios`
* [Downloadable XCFramework File](https://media.twiliocdn.com/sdk/ios/chat/releases/5.0.1/twilio-chat-ios-5.0.1.zip)
* [SDK Documentation](https://media.twiliocdn.com/sdk/ios/chat/releases/5.0.1/docs/)

If you need help installing these frameworks in your project, see our [installation guidance](/docs/chat/sdk-download-install).

The Chat iOS SDK is unavailable via Carthage because we require support for binary XCFramework files.

> \[!NOTE]
>
> If you are interested in Mac Catalyst support, please contact support to get hands-on experience with it.

## Support for Previous Versions of the Chat SDKs

Twilio Programmable Chat SDKs use [Semantic Versioning](https://www.semver.org/). Twilio supports version N-1 for 12 months after the first GA release of version N. We recommend that you upgrade to the latest version as soon as possible to avoid any breaking changes. Version 5.x is the latest iOS version.

**Support for 4.x will cease on May 17, 2022**. Please upgrade to the latest version.

**Support for 3.x ceased on July 20, 2021**. Please upgrade to the latest version.

**Support for 2.x ceased on March 6, 2021**. Please upgrade to the latest version.

**End-of-Life for 1.x occurred on June 30, 2019.** Please upgrade to the latest version.

## Changelogs

Links are provided to specific patch versions here. We don't recommend using these links unless you have a specific need for a certain patch of a release.

### Programmable Chat iOS 5.0.1 *(August 31, 2021)*

* [Archive](https://media.twiliocdn.com/sdk/ios/chat/releases/5.0.1/twilio-chat-ios-5.0.1.zip)
* [Docs](https://media.twiliocdn.com/sdk/ios/chat/releases/5.0.1/docs/)
* sha256: `cab46d255fbac00a837da3dd81cd5342b29f0e606fba161142307d7cd79496fa`

#### Changes

* Fixed a bug when `onChannelAdded` event sometimes didn't arrive after restoring application from background.

***

### Programmable Chat iOS 5.0.0 *(May 17, 2021)*

* [Archive](https://media.twiliocdn.com/sdk/ios/chat/releases/5.0.0/twilio-chat-ios-5.0.0.zip)
* [Docs](https://media.twiliocdn.com/sdk/ios/chat/releases/5.0.0/docs/)
* sha256: `638a8136b2eb226e43342b30e70bc80c8e5b6f917bc9c86a45c942dbd5d8686b`

#### Breaking changes

* Major under-the-hood improvement (the "Sessionless" protocol). This improvement is designed primarily for improved reliability. While this is not a breaking code change, it does carry a meaningful impact on timing:
  * SDK commands will return success or failure up to \~10% more quickly than before.
  * **Real-time updates of data are now likely to arrive after the command completes**.For example, `[TCHChannel setAttributes]` will invoke completion (i.e., success) while `[TCHChannel attributes]` still returns the old value. To see the new value, we recommend waiting for an update event, e.g., in the `chatClient:channel:updated:TCHChannelUpdateAttributes` delegate.
* The channel list page size increased from 50 to 100. Please make sure your code respects any returned page size, rather than assuming 50 (or 100).
* Some error messages have changed:
  * Declining an invite while already joined will return an error `50601, Invite not found instead` of `50602, Cannot decline invite when already channel member`.
  * Trying to leave a channel you're not part of will return error `50402, Member not found` instead of `50400, User not member of channel`.

***

### Programmable Chat iOS 4.2.1 *(April 22, 2021)*

* [Archive](https://media.twiliocdn.com/sdk/ios/chat/releases/4.2.1/twilio-chat-ios-4.2.1.zip)
* [Docs](https://media.twiliocdn.com/sdk/ios/chat/releases/4.2.1/docs/)
* sha256: `9477f31c65dfb90550cbc0f5fb9f5bcadf975a1debfb734d370a6cecb66f641b`

#### Changes \[#changes-2]

* Fixed setting queue from properties.
* Fixed an issue when a connection could be not established after returning from background. The issue was introduced in 4.1.0 and users are highly encouraged to upgrade to this version to avoid disconnection problems.

***

### Programmable Chat iOS 4.2.0 *(March 23, 2021)*

* [Archive](https://media.twiliocdn.com/sdk/ios/chat/releases/4.2.0/twilio-chat-ios-4.2.0.zip)
* [Docs](https://media.twiliocdn.com/sdk/ios/chat/releases/4.2.0/docs/)
* sha256: `57906c180c5e5bf6fa1fee68ae53fff3971978dccecd66de29ab00b1a3fb4e3e`

#### Changes \[#changes-3]

* Added possibility to set dispatch queue to get reports not from main queue, but from selected one.
* Added support for XCFrameworks with arm64 simulator.
* Added support for SPM.
* Removed support of Carthage until it supports binary XCFrameworks.
* Fixed an issue when connection could be not established after returning from background.

***

### Programmable Chat iOS 4.1.0 *(January 29, 2020)*

* [Archive](https://media.twiliocdn.com/sdk/ios/chat/releases/4.1.0/twilio-chat-ios-4.1.0.tar.bz2)
* [Docs](https://media.twiliocdn.com/sdk/ios/chat/releases/4.1.0/docs/)
* sha256: `8dc38e7821af141983b99fa504c4f557d1fec8e3f0083a716f7269ef645845e0`

#### Changes \[#changes-4]

* The SDK now supports HTTP proxy. Proxy is enabled with a new flag `useProxy` passed to client properties on client creation. Proxy settings are read from the system configuration.
* Added the ability to defer certificate checks to the OS (disable pinning) using a new flag, `deferCertificateTrustToPlatform`, passed to client properties on client creation.
* A callback from `withAttributes` on message options creation will be called now after a message would be sent.

#### Known issues

* `TCHUserUpdateReachabilityOnline` and `TCHUserUpdateReachabilityNotifiable` events could not come sometimes.

***

### Programmable Chat iOS 4.0.2 *(November 13, 2020)*

* [Archive](https://media.twiliocdn.com/sdk/ios/chat/releases/4.0.2/twilio-chat-ios-4.0.2.tar.bz2)
* [Docs](https://media.twiliocdn.com/sdk/ios/chat/releases/4.0.2/docs/)

#### Changes \[#changes-5]

* Fixed a bug when `onChannelDeleted` doesn't come for private Channel when Member removed by other user.
* Fixed a bug which could lead to client synchronisation stuck.
* Fixed a crash on accessing `memberWithIdentity` from multiple threads.

***

### Programmable Chat iOS 4.0.1 *(October 21, 2020)*

* [Archive](https://media.twiliocdn.com/sdk/ios/chat/releases/4.0.1/twilio-chat-ios-4.0.1.tar.bz2)
* [Docs](https://media.twiliocdn.com/sdk/ios/chat/releases/4.0.1/docs/)

#### Changes \[#changes-6]

* Fixed a bug which could lead to crashes on member attributes update.

***

### Programmable Chat iOS 4.0.0 *(July 20, 2020)*

* [Archive](https://media.twiliocdn.com/sdk/ios/chat/releases/4.0.0/twilio-chat-ios-4.0.0.tar.bz2)
* [Docs](https://media.twiliocdn.com/sdk/ios/chat/releases/4.0.0/docs/)

#### Breaking changes \[#breaking-changes-2]

* Renamed `TCHMessage` accessor: `timestamp` as `dateCreated`; `timestampAsDate` as`dateCreatedAsDate`.
* Asynchronous `[TCHMembers membersWithCompletion]` transformed to synchronous `[TCHMembers membersList]`.
* Added `TCHMemberUpdateLastConsumptionTimestamp`.
  * This as a result also changed value of `TCHMemberUpdateAttributes`, potentially a silent breaking change if this value was serialized.
* Changed TWSMap/TWSList `queryItemsWithOptions` to return error in completion if `pageSize` is 0.
* Changed `[TCHChannel getUnconsumedMessagesCountWithCompletion]` to return nil instead of 0 if message consumption horizon was not set.
  * Completion now uses `NSNumber*` (nullable object type), instead of NSUInteger to accommodate this change.
* Changed `[TCHMessages setNoMessagesConsumedWithCompletion]` to use nullable `NSNumber*`, it will always return nil (because it resets the consumption horizon).

#### Changes \[#changes-7]

* Added `[TCHMessage getMediaContentTemporaryUrlWithCompletion]` to get a temporary direct link to Media content.
* To download Media by direct URL, use native iOS API, such as `[NSData dataWithContentsOfURL()]`.
* Deprecated `[TCHMessage getMediaWithOutputStream:...]`. Use above API instead.

***

### Programmable Chat iOS 3.1.1 *(June 1, 2020)*

* [Archive](https://media.twiliocdn.com/sdk/ios/chat/releases/3.1.1/twilio-chat-ios-3.1.1.tar.bz2)
* [Docs](https://media.twiliocdn.com/sdk/ios/chat/releases/3.1.1/docs/)

#### Changes \[#changes-8]

* Fixed the bug when connection is dropped with message: "The WebSocket message exceeded the locally configured limit".

***

### Programmable Chat iOS 3.1.0 *(May 20, 2020)*

This version has been deprecated June 1, please use 3.1.1.

* [Archive](https://media.twiliocdn.com/sdk/ios/chat/releases/3.1.1/twilio-chat-ios-3.1.1.tar.bz2)
* [Docs](https://media.twiliocdn.com/sdk/ios/chat/releases/3.1.1/docs/)

#### Changes

* Added ability to specify custom [command timeout](https://media.twiliocdn.com/sdk/ios/chat/releases/3.1.1/docs/Classes/TwilioChatClientProperties.html#//api/name/commandTimeout) for operations like send message, join to a channel, etc.

***

### Programmable Chat iOS 3.0.2 *(April 2, 2020)*

This version was deprecated June 1, 2019, please use 3.1.1.

* [Archive](https://media.twiliocdn.com/sdk/ios/chat/releases/3.1.1/twilio-chat-ios-3.1.1.tar.bz2)
* [Docs](https://media.twiliocdn.com/sdk/ios/chat/releases/3.1.1/docs/)

#### Changes \[#changes-9]

* Fixed an issue when the same state comes to `[TwilioChatClient chatClient:connectionStateUpdated:]`.
* Improved stability on shutdown, fixed crash issues.

***

### Programmable Chat iOS 3.0.1 *(March 12, 2020)*

* [Archive](https://media.twiliocdn.com/sdk/ios/chat/releases/3.0.1/twilio-chat-ios-3.0.1.tar.bz2)
* [Docs](https://media.twiliocdn.com/sdk/ios/chat/releases/3.0.1/docs/)

#### Changes \[#changes-10]

* Restored missing `CFBundleVersion` and `CFBundleShortVersionString` in the `Info.plist` of the framework, which fixes exporting app archives to AppStore.

***

### Programmable Chat iOS 3.0.0 *(March 6, 2020)*

* [Archive](https://media.twiliocdn.com/sdk/ios/chat/releases/3.0.0/twilio-chat-ios-3.0.0.tar.bz2)
* [Docs](https://media.twiliocdn.com/sdk/ios/chat/releases/3.0.0/docs/)

#### Breaking changes \[#breaking-changes-3]

* Dropped iOS v9, v10 support. Minimum iOS version now is 11.0
* Added type-safe interface `TCHJsonAttributes` for Attributes (`TCHChannel`, `TCHMessage`, `TCHMember`, `TCHUser`). Now it supports not only Json Object, which was translated to `NSDictionary`, but also `NSArray`, `NSString`, `NSNumber`, `NSNull`.

#### Changes \[#changes-11]

* Fixed a bug when channel attributes are empty when `chatClient:channelAdded:` called.
* Fixed an issue when sometimes connecting events don't arrive.
* Fixed incorrect behavior when user identity contained some special symbols.
* New type of error `TCHClientConnectionStateFatalError` could appear in some cases. This error means chat is in a terminal state, and needs to re-create the client.

### 2.X

For older changelog entries including 2.x, see the [2.x Changelog](/docs/chat/ios/2x-changelog).
