Changelog for Swift SDK

## 9.3.3 *August 7, 2025* | Type | Changes | |------|----------| | **Fixed** | • APM libraries crash fix: Removed `deinit` methods that were calling `session.invalidateAndCancel()` from `PresenceEffectFactory` and `SubscribeEffectFactory` to prevent race conditions with Application Performance Monitoring libraries. Session cleanup now happens exclusively in [HTTPSession.deinit](https://github.com/pubnub/swift/blob/9.3.2/Sources/PubNub/Networking/HTTPSession.swift#L96-L99), which ensures request cancellation before invalidation. This prevents crashes from occurring inside APM libraries when they intercept network operations during session invalidation. | ## 9.3.2 *August 6, 2025* | Type | Changes | |------|----------| | **Fixed** | • Implement missing token parsing logic in KMP layer (internal use). | ## 9.3.1 *July 31, 2025* | Type | Changes | |------|----------| | **Fixed** | • Fix the issue with recursive locking introduced in 9.3.0 when disposing a SubscriptionSet. | ## 9.3.0 *July 29, 2025* | Type | Changes | |------|----------| | **Added** | • Add the ability to subscribe to presence channels only, without their main counterparts. | ## 9.2.3 *July 29, 2025* | Type | Changes | |------|----------| | **Fixed** | • Fix WeakBox hash stability. | ## 9.2.2 *July 17, 2025* | Type | Changes | |------|----------| | **Fixed** | • Add a wrapper around the reconnecting method for KMP (internal use). | ## 9.2.1 *June 20, 2025* | Type | Changes | |------|----------| | **Fixed** | • Add missing heartbeat call when changing channels or channel groups. | ## 9.2.0 *May 15, 2025* | Type | Changes | |------|----------| | **Added** | • The `encryptStream(from:)` convenience method is designed to encrypt a local file. It eliminates the need for the caller to provide an `InputStream` and its content length - these are handled internally. You only need to pass a local file URL. | ## 9.1.0 *May 13, 2025* | Type | Changes | |------|----------| | **Added** | • The `encrypt(stream:contentLength:)` method in `CryptoModule` now returns an `EncryptedStreamResult` containing both the encrypted stream and its total content length.<br/>• The new `decryptStream(from:to:)` method in CryptoModule simplifies file decryption by automatically handling low-level details, in contrast to `decrypt(stream:contentLength:to:)`. Instead of manually creating an InputStream and specifying the content length, you now only need to provide the source and destination URLs. | ## 9.0.1 *March 20, 2025* | Type | Changes | |------|----------| | **Fixed** | • Include endpoint error message in PubNubError's `details` property.<br/>• Defer computing the textual representation of EventEngine's current and previous states until needed. | ## 9.0.0 *March 4, 2025* | Type | Changes | |------|----------| | **Added** | • Add `OSLogWriter` as the recommended `LogWriter` to use.<br/>• Refine `LogWriter` protocol signature to support built-in `Logger` from the `os` framework.<br/>• Enhance object descriptions with `CustomStringConvertible`.<br/>• Add explanatory documentation for debug-level logging messages. | ## 8.3.1 *January 24, 2025* | Type | Changes | |------|----------| | **Fixed** | • Fix the issue where the request's completion handler is not invoked in certain scenarios. | ## 8.3.0 *January 20, 2025* | Type | Changes | |------|----------| | **Added** | • Add `ETag` support for setting Channel and User metadata. | ## 8.2.5 *January 16, 2025* | Type | Changes | |------|----------| | **Fixed** | • Fix the crash issue caused by multiple accesses to the `state` property in multithreaded scenarios. | ## 8.2.4 *January 10, 2025* | Type | Changes | |------|----------| | **Fixed** | • Fix the issue of passing an invalid value for the `storeTTL` parameter (internal use).<br/>• Handle `shouldCompress` parameter (internal use). | ## 8.2.3 *January 3, 2025* | Type | Changes | |------|----------| | **Added** | • Handle all possible values for the `include` field in the KMP layer (internal usage). | ## 8.2.2 *December 11, 2024* | Type | Changes | |------|----------| | **Fixed** | • Fix excessive memory usage in the high-volume messages use case.<br/>• Add missing `customMessageType` in `PubNubFileEvent`. | ## 8.2.1 *December 9, 2024* | Type | Changes | |------|----------| | **Added** | • Add support for `customMessageType` in the KMP layer (internal usage). | ## 8.2.0 *December 4, 2024* | Type | Changes | |------|----------| | **Added** | • Add support for the Membership `type` field.<br/>• Deprecate methods containing `uuid` parameter, introduce new versions.<br/>• Deprecate methods containing `include` parameter of `Bool` type, introduce new versions.<br/>• Deprecate `remove(channel:custom:completion:)`, introduce new version .<br/>• Replace `PubNubUUIDMetadata` with `PubNubUserMetadata`.<br/>• Replace `PubNubUUIDMetadataBase` with `PubNubUserMetadataBase`.<br/>• Add an alias for backward compatibility with the customer code using `PubNubUUIDMetadata`.<br/>• Add an alias for backward compatibility with the customer code using `PubNubUUIDMetadataBase`.<br/>• Replace `PubNubUUIDMetadataChangeset` with `PubNubUserMetadataChangeset`.<br/>• Add an alias for backward compatibility with the customer code using `PubNubUUIDMetadataChangeset`. | ## 8.1.0 *November 18, 2024* | Type | Changes | |------|----------| | **Added** | • Add custom message type support for the following APIs: publish, signal, share file, subscribe, and history. | ## 8.0.1 *October 17, 2024* | Type | Changes | |------|----------| | **Added** | • Add getToken() method for KMPPubNub (internal usage). | ## 8.0.0 *September 23, 2024* | Type | Changes | |------|----------| | **Added** | • Replace module name with `PubNubSDK` due to compiler error when a public type shares the same name as the module.<br/>• Add new `subscriptionChanged(channels, groups)` connection status and remove previously deprecated `connecting` and `reconnecting` cases.<br/>• Remove previously deprecated `.legacyExponential(base, scale, maxDelay)` reconnection policy.<br/>• Added additional fields to fetch in `PubNub.MembershipInclude` and `PubNub.MemberInclude`.<br/>• Set default `AutomaticRetry` for retrying subscribe requests with exponential reconnection policy.<br/>• Add support for attaching additional listeners to `Subscription` and `SubscriptionSet`. | | **Fixed** | • Ensure that subscriptions are always internally stored as weak references. | ## 7.3.3 *September 13, 2024* | Type | Changes | |------|----------| | **Fixed** | • Added synchronized access inside `WeakSet` and for global subscriptions. | ## 7.3.2 *July 22, 2024* | Type | Changes | |------|----------| | **Fixed** | • Add missing public initializers for `EncryptedData` and `EncryptedStreamData`. | ## 7.3.1 *June 18, 2024* | Type | Changes | |------|----------| | **Fixed** | • Calling .leave request in missing cases. | ## 7.3.0 *June 12, 2024* | Type | Changes | |------|----------| | **Added** | • Adjusting to FCM HTTP v1 API. | ## 7.2.1 *May 9, 2024* | Type | Changes | |------|----------| | **Added** | • Adding support for visionOS. | | **Fixed** | • Updating EventEngine dependencies after adding a new listener. | ## 7.2.0 *April 16, 2024* | Type | Changes | |------|----------| | **Added** | • Adding PrivacyInfo.xcprivacy.<br/>• Moving retry logic away from EventEngine. | | **Modified** | • Removing SubscribeSessionFactory with SubscriptionConfiguration.<br/>• Making SubscriptionSession class an internal. | ## 7.1.0 *March 18, 2024* | Type | Changes | |------|----------| | **Fixed** | • Preventing disconnection when subscribing via `PubNub` to a channel that was already subscribed to.<br/>• Fixes for computing a hash value in `CryptoModule`. | ## 7.0.0 *February 21, 2024* | Type | Changes | |------|----------| | **Added** | • Adding the new Listeners API.<br/>• Enabling EventEngine by default. | ## 6.3.0 *January 22, 2024* | Type | Changes | |------|----------| | **Added** | • Introducing Subscribe & Presence EventEngine. | ## 6.2.3 *November 28, 2023* | Type | Changes | |------|----------| | **Fixed** | • Handle unencrypted message while getting it with CryptoModule configured. | ## 6.2.2 *October 30, 2023* | Type | Changes | |------|----------| | **Modified** | • Update license information. | ## 6.2.1 *October 23, 2023* | Type | Changes | |------|----------| | **Fixed** | • Align on namings across all supported platforms. | ## v6.2.0 *October 16, 2023* | Type | Changes | |------|----------| | **Added** | • Add CryptorModule that allows configuring SDK to encrypt and decrypt messages. | | **Fixed** | • Improved security of crypto implementation by adding AES-CBC cryptor. | ## 6.1.0 *August 30, 2023* | Type | Changes | |------|----------| | **Added** | • To make client integration more flexible for different projects setup, the `$PubNubAsStaticFramework` flag has been added to `PubNubSwift.podspec`. With `$PubNubAsStaticFramework = true` in `Podfile` SDK will be integrated as a static library. | ## 6.0.5 *May 18, 2023* | Type | Changes | |------|----------| | **Fixed** | • Uppercasing of the `excluded_devices` field to match the format expected by the REST API. | ## 6.0.4 *March 16, 2023* | Type | Changes | |------|----------| | **Modified** | • Change the settings for subscribe `URLSession` and limit the number of concurrent connections per host.<br/>• Call presence leave using subscribe `URLSession` to avoid potential presence race of condition. | ## 6.0.3 *January 4, 2023* | Type | Changes | |------|----------| | **Fixed** | • Fix issue because of which listener wasn't `deinit` even when reference on it has been nullified. | ## 6.0.2 *December 12, 2022* | Type | Changes | |------|----------| | **Fixed** | • Fix memory leak within Subscription Session. | | **Modified** | • Use specific GitHub action for `.pubnub.yml` validation. | ## 6.0.1 *September 5, 2022* | Type | Changes | |------|----------| | **Fixed** | • Fix issue because of which `Example` project didn't built with missing `swift` reference error.<br/>• Fix issue because of which Carthage was unable to build caused by schemas without targets. | ## 6.0.0 *July 5, 2022* | Type | Changes | |------|----------| | **Added** | • VSP methods and models have been exposed via modules on the PubNub instance.<br/>• `FlatJSONCodable` replaces `[String: JSONCodableScalar]` inside the VSP models. | | **Modified** | • PubNub instances has been changed from a `struct` to a `class`.<br/>• `HTTPSession` has been made public for easier per-request overrides of the Network Session. | ## 5.1.0 *February 2, 2022* | Type | Changes | |------|----------| | **Added** | • Add affected channels and groups under `affected` resources list. | ## 5.0.1 *January 19, 2022* | Type | Changes | |------|----------| | **Fixed** | • Fix issue because of which access token not updated in subscription session. | ## 5.0.0 *January 12, 2022* | Type | Changes | |------|----------| | **Modified** | • BREAKING CHANGES: Disable automated `uuid` generation and make it mandatory to specify during PubNubConfiguration instance creation. | ## 4.1.2 *November 8, 2021* | Type | Changes | |------|----------| | **Fixed** | • Make `name` field optional for channel and UUID metadata. | ## 4.1.1 *November 5, 2021* | Type | Changes | |------|----------| | **Fixed** | • Fix issue because of which request with applied mutators not used. | ## 4.1.0 *September 16, 2021* | Type | Changes | |------|----------| | **Added** | • Add ability to parse permissions from token provided by servers.<br/>• Make it possible to add component identifiers for requests. | | **Fixed** | • Fix `bufferTooSmall` and make temporary buffers for files encryption / decryption adaptive in size to provided stream buffer size.<br/>• Don't perform HEX-encoding of `Data` with FCM token which should be used as-is. | | **Modified** | • Use `token` instead of `authKey` (if specified) for query `auth`. | ## v4.0.2 *August 3, 2021* | Type | Changes | |------|----------| | **Fixed** | • Memory leaks with captured request in subscription loop. | ## v4.0.1 *July 7, 2021* | Type | Changes | |------|----------| | **Fixed** | • Subscribe Factory will hash additional values when comparing sessions<br/>• Adding APNS2 Devices will correctly return the devices that were added.<br/>• Per request configuration changes will correct be applied to the outgoing request. | ## v4.0.0 *June 8, 2021* | Type | Changes | |------|----------| | **Added** | • BREAKING CHANGE: Crypto by default initialized with `randomizeIV` set to `true` which will encrypt / decrypt data with publish / subscribe / history API calls using randomized initialization vector | | **Modified** | • Add new `sdks` section to `.pubnub.yml` with information about available artifacts and distribution variants | ## v3.1.3 *May 28, 2021* | Type | Changes | |------|----------| | **Modified** | • Custom error messages (from functions) will be included inside PubNub Error Details | | **Fixed** | • Fix Coding issue when setting UUIDMetadata objects | ## v3.1.2 *April 30, 2021* | Type | Changes | |------|----------| | **Fixed** | • Subscribe Message events will have the correct messageType flag | ## v3.1.1 *March 12, 2021* | Type | Changes | |------|----------| | **Fixed** | • FileEvents will contain the file name stored with PubNub and not the local filename (if different) | | **Modified** | • PubNub model objects are now Hashable | ## v3.1.0 *October 6, 2020* | Type | Changes | |------|----------| | **Added** | • CryptoStream and CryptoInputStream can be used to perform crypto operations on streams of data<br/>• File upload/download support<br/>• Added includeUUID and includeMessageType flags to History | | **Modified** | • History will now has a default limit of 100 for single-channel and 25 for multichannel requests<br/>• Removed depcreated platform version support to align with Xcode 12 warnings | ## v3.0.1 *June 25, 2020* | Type | Changes | |------|----------| | **Fixed** | • Fixed crash when performing many requests simulataneously | ## v3.0.0 *June 17, 2020* | Type | Changes | |------|----------| | **Added** | • Added Objects v2 API and removed Objects v1 API | | **Modified** | • Replace PubNub API response objects with primitives or prtocols<br/>• Replace Subscribe Event objects with primitives or prtocols<br/>• Subscribe Listener now has a batched event handler<br/>• Renamed several APIs to align naming across all APIs<br/>• PubNubConfiguration properites can all be set through default init<br/>• Reduced access control of objects that are not public facing<br/>• Request level configuration available for most PubNub APIs | ## v2.5.4 *June 25, 2020* | Type | Changes | |------|----------| | **Fixed** | • Fixed crash when performing many requests simulataneously | ## v2.5.3 *June 9, 2020* | Type | Changes | |------|----------| | **Modified** | • Payload and FCMTarget fields are now optional for PubNubPushMessage | | **Fixed** | • Fixed an issue where nested presence state could be published | ## v2.5.2 *June 4, 2020* | Type | Changes | |------|----------| | **Fixed** | • Resolves possible memory leaks related to listeners<br/>• Responds with the appropriate error when a Signal payload is too large<br/>• Added PAM support to Channels for Channel-Group endpoint<br/>• Invalid JSON will attempt to be parsed for the next Timetoken, and if successful will no interrupt the current subscription loop | ## v2.5.1 *May 7, 2020* | Type | Changes | |------|----------| | **Fixed** | • Add `uuid` and `channel` to the Message Action Event<br/>• Fixed typos inside log messages | | **Modified** | • AnyJSON dictionaries can now perform a rawValue subscript that will return the underlying Any object | ## v2.5.0 *March 26, 2020* | Type | Changes | |------|----------| | **Modified** | • Message Subscribe Events and Message History will now return the decrypted `Data` blob in the event it was decrypted, but couldn't be stringified<br/>• Crypto will now accept the type of `String.Encoding` to be used when converting between `Data` and `String`<br/>• Object API fetch|create|update methods with generic response objects have been added<br/>• Object API fetch|create|update methods with protocol response objects have been added<br/>• Object types User|Space|Member|Membership can now convert the underlying type using `transocde(into:)` | | **Fixed** | • Corrected the access control level of `MembershipIdentifiable` properties<br/>• User/Space Subscription Update events wouldn't properly handle partial object updates | ## v2.4.2 *March 12, 2020* | Type | Changes | |------|----------| | **Fixed** | • Make `region` optional during `originTimetoken` parsing and set to 0 by default | ## v2.4.1 *January 24, 2020* | Type | Changes | |------|----------| | **Fixed** | • A `reconnecting` event will be emitted once subscription starts retrying | ## v2.4.0 *January 17, 2020* | Type | Changes | |------|----------| | **Added** | • PAM Token Management System added to manage Object API auth tokens | | **Fixed** | • HereNow Presence will now work when only groups are being used | ## v2.3.3 *January 7, 2020* | Type | Changes | |------|----------| | **Fixed** | • Enable ability to send auth token on Presence endpoints | ## v2.3.2 *December 9, 2019* | Type | Changes | |------|----------| | **Fixed** | • Subscription requests will now properly cancel when updating existing subscription loop | ## v2.3.1 *December 3, 2019* | Type | Changes | |------|----------| | **Fixed** | • Duplicate subscription will no longer start if a current subscription is connecting<br/>• Added missing APNS2 pubnub config field to publish payload object<br/>• Fixed Coding issue when a scalar value is used for APNS2 publish payload object<br/>• Subscription will no long attempt to automatically reconnect after an unexpected disconnet | ## v2.3.0 *November 25, 2019* | Type | Changes | |------|----------| | **Added** | • Added convenience objects for creating push publish messages<br/>• List/Add/Remove/Remove-All of APNS2 push channels for devices | | **Fixed** | • `Channel` property on push responses is not public | ## v2.2.0 *November 14, 2019* | Type | Changes | |------|----------| | **Modified** | • `Timetoken` was changed from an Int64 to UInt64 to avoid negative timetoken values<br/>• Removed `PubNubRouter`, and replaced with multiple service specific `HTTPRouter` implementations<br/>• Removed `Endpoint` type<br/>• Renamed `Response` to `EndpointResponse`<br/>• Removed `HTTPHeader` & `HTTPHeader`, and replaced with `[String: String]`<br/>• Renamed `Session` to `HTTPSession` and made it an internal type<br/>• Created `RequestReplaceable` and made `Request` an internal type | ## v2.1.2 *November 12, 2019* | Type | Changes | |------|----------| | **Fixed** | • PubNub Info.plist is now included on Cocoapod and Carthage deployed builds | ## v2.1.1 *November 6, 2019* | Type | Changes | |------|----------| | **Fixed** | • Encoding `JSONCodableScalar` values will now properly encode to a single value<br/>• Membership APIs no longer use hardcoded subscribe key | ## v2.1.0 *November 1, 2019* | Type | Changes | |------|----------| | **Added** | • Added support for Message Action Subscription Listener<br/>• Fetch previously published Message Actions and Messages via History APIs<br/>• Fetch previously published Message Actions on a channel<br/>• Add/Remove Message Actions on previously published messages | ## v2.0.2 *October 25, 2019* | Type | Changes | |------|----------| | **Fixed** | • Add/Update documentation for public classes, methods, and properties | ## v2.0.1 *October 21, 2019* | Type | Changes | |------|----------| | **Fixed** | • Update the version inside the podspec file | ## v2.0.0 *October 17, 2019* | Type | Changes | |------|----------| | **Fixed** | • Subscribe/Unsubscribe will now properly cancel/restart the subscribe loop when completely stoppping cycle<br/>• Fixed memory leak inside Hearthbeat response handler<br/>• Fixed memory leak inside SubscriptionSessionFactory | | **Modified** | • PNError enum has been replaced by PubNubError struct to allow for greater flexibility in error handling and recognition<br/>• AnyJSON as been replaced by the JSONCodable protocol for method parameters allowing any conforming object to be passed<br/>• Removed initialized and cancelled as ConnectionsStatus options<br/>• Response error events due to cancellations will now be suppresed by default by the SubscriptionListener. They can be toggled on using a the `supressCancellationErrors` property | | **Added** | • Added subscription event listener for subscribe/unsubscribe changes | ## v1.2.1 *October 15, 2019* | Type | Changes | |------|----------| | **Modified** | • Made the subscription token a property on the listener for cleaner setup | ## v1.2.0 *October 8, 2019* | Type | Changes | |------|----------| | **Modified** | • Removed development dependencies from being included in Swift Package imports<br/>• Added meta event listener covering all event types | | **Added** | • Support for Objects added | | **Fixed** | • Changed `ConnectionStatus.isActive` and `ConnectionStatus.isConnected` access control to public<br/>• Fixed typo in PubNub.Push method parameters<br/>• Add support for Global HereNow<br/>• Fixed HereNow stateless response decoding<br/>• Fixed HereNow single channel response decoding | ## v1.1.0 *September 3, 2019* | Type | Changes | |------|----------| | **Added** | • Add support for Signal Subscription Listener<br/>• Add support for Signal publish API | | **Fixed** | • Fixed crash attempting to create URLSessionTasks from invalidated URLSession<br/>• Default Encryption/Decryption methodology now properly aligns with other SDKs<br/>• `?` characters inside URL query parameters will now be properly url encoded | | **Modified** | • Exposed add(listener:) to be called by PubNub instance directly | ## v1.0.0 *August 23, 2019* | Type | Changes | |------|----------| | **Added** | • Initial release of native Swift PubNub SDK |

9.3.3

August 7, 2025
Fixed
  • APM libraries crash fix: Removed deinit methods that were calling session.invalidateAndCancel() from PresenceEffectFactory and SubscribeEffectFactory to prevent race conditions with Application Performance Monitoring libraries. Session cleanup now happens exclusively in [HTTPSession.deinit](https://github.com/pubnub/swift/blob/9.3.2/Sources/PubNub/Networking/HTTPSession.swift#L96-L99), which ensures request cancellation before invalidation. This prevents crashes from occurring inside APM libraries when they intercept network operations during session invalidation.

9.3.2

August 6, 2025
Fixed
  • Implement missing token parsing logic in KMP layer (internal use).

9.3.1

July 31, 2025
Fixed
  • Fix the issue with recursive locking introduced in 9.3.0 when disposing a SubscriptionSet.

9.3.0

July 29, 2025
Added
  • Add the ability to subscribe to presence channels only, without their main counterparts.

9.2.3

July 29, 2025
Fixed
  • Fix WeakBox hash stability.

9.2.2

July 17, 2025
Fixed
  • Add a wrapper around the reconnecting method for KMP (internal use).

9.2.1

June 20, 2025
Fixed
  • Add missing heartbeat call when changing channels or channel groups.

9.2.0

May 15, 2025
Added
  • The encryptStream(from:) convenience method is designed to encrypt a local file. It eliminates the need for the caller to provide an InputStream and its content length - these are handled internally. You only need to pass a local file URL.

9.1.0

May 13, 2025
Added
  • The encrypt(stream:contentLength:) method in CryptoModule now returns an EncryptedStreamResult containing both the encrypted stream and its total content length.
  • The new decryptStream(from:to:) method in CryptoModule simplifies file decryption by automatically handling low-level details, in contrast to decrypt(stream:contentLength:to:). Instead of manually creating an InputStream and specifying the content length, you now only need to provide the source and destination URLs.

9.0.1

March 20, 2025
Fixed
  • Include endpoint error message in PubNubError's details property.
  • Defer computing the textual representation of EventEngine's current and previous states until needed.

9.0.0

March 4, 2025
Added
  • Add OSLogWriter as the recommended LogWriter to use.
  • Refine LogWriter protocol signature to support built-in Logger from the os framework.
  • Enhance object descriptions with CustomStringConvertible.
  • Add explanatory documentation for debug-level logging messages.

8.3.1

January 24, 2025
Fixed
  • Fix the issue where the request's completion handler is not invoked in certain scenarios.

8.3.0

January 20, 2025
Added
  • Add ETag support for setting Channel and User metadata.

8.2.5

January 16, 2025
Fixed
  • Fix the crash issue caused by multiple accesses to the state property in multithreaded scenarios.

8.2.4

January 10, 2025
Fixed
  • Fix the issue of passing an invalid value for the storeTTL parameter (internal use).
  • Handle shouldCompress parameter (internal use).

8.2.3

January 3, 2025
Added
  • Handle all possible values for the include field in the KMP layer (internal usage).

8.2.2

December 11, 2024
Fixed
  • Fix excessive memory usage in the high-volume messages use case.
  • Add missing customMessageType in PubNubFileEvent.

8.2.1

December 9, 2024
Added
  • Add support for customMessageType in the KMP layer (internal usage).

8.2.0

December 4, 2024
Added
  • Add support for the Membership type field.
  • Deprecate methods containing uuid parameter, introduce new versions.
  • Deprecate methods containing include parameter of Bool type, introduce new versions.
  • Deprecate remove(channel:custom:completion:), introduce new version .
  • Replace PubNubUUIDMetadata with PubNubUserMetadata.
  • Replace PubNubUUIDMetadataBase with PubNubUserMetadataBase.
  • Add an alias for backward compatibility with the customer code using PubNubUUIDMetadata.
  • Add an alias for backward compatibility with the customer code using PubNubUUIDMetadataBase.
  • Replace PubNubUUIDMetadataChangeset with PubNubUserMetadataChangeset.
  • Add an alias for backward compatibility with the customer code using PubNubUUIDMetadataChangeset.

8.1.0

November 18, 2024
Added
  • Add custom message type support for the following APIs: publish, signal, share file, subscribe, and history.

8.0.1

October 17, 2024
Added
  • Add getToken() method for KMPPubNub (internal usage).

8.0.0

September 23, 2024
Added
  • Replace module name with PubNubSDK due to compiler error when a public type shares the same name as the module.
  • Add new subscriptionChanged(channels, groups) connection status and remove previously deprecated connecting and reconnecting cases.
  • Remove previously deprecated .legacyExponential(base, scale, maxDelay) reconnection policy.
  • Added additional fields to fetch in PubNub.MembershipInclude and PubNub.MemberInclude.
  • Set default AutomaticRetry for retrying subscribe requests with exponential reconnection policy.
  • Add support for attaching additional listeners to Subscription and SubscriptionSet.
Fixed
  • Ensure that subscriptions are always internally stored as weak references.

7.3.3

September 13, 2024
Fixed
  • Added synchronized access inside WeakSet and for global subscriptions.

7.3.2

July 22, 2024
Fixed
  • Add missing public initializers for EncryptedData and EncryptedStreamData.

7.3.1

June 18, 2024
Fixed
  • Calling .leave request in missing cases.

7.3.0

June 12, 2024
Added
  • Adjusting to FCM HTTP v1 API.

7.2.1

May 9, 2024
Added
  • Adding support for visionOS.
Fixed
  • Updating EventEngine dependencies after adding a new listener.

7.2.0

April 16, 2024
Added
  • Adding PrivacyInfo.xcprivacy.
  • Moving retry logic away from EventEngine.
Modified
  • Removing SubscribeSessionFactory with SubscriptionConfiguration.
  • Making SubscriptionSession class an internal.

7.1.0

March 18, 2024
Fixed
  • Preventing disconnection when subscribing via PubNub to a channel that was already subscribed to.
  • Fixes for computing a hash value in CryptoModule.

7.0.0

February 21, 2024
Added
  • Adding the new Listeners API.
  • Enabling EventEngine by default.

6.3.0

January 22, 2024
Added
  • Introducing Subscribe & Presence EventEngine.

6.2.3

November 28, 2023
Fixed
  • Handle unencrypted message while getting it with CryptoModule configured.

6.2.2

October 30, 2023
Modified
  • Update license information.

6.2.1

October 23, 2023
Fixed
  • Align on namings across all supported platforms.

v6.2.0

October 16, 2023
Added
  • Add CryptorModule that allows configuring SDK to encrypt and decrypt messages.
Fixed
  • Improved security of crypto implementation by adding AES-CBC cryptor.

6.1.0

August 30, 2023
Added
  • To make client integration more flexible for different projects setup, the $PubNubAsStaticFramework flag has been added to PubNubSwift.podspec. With $PubNubAsStaticFramework = true in Podfile SDK will be integrated as a static library.

6.0.5

May 18, 2023
Fixed
  • Uppercasing of the excluded_devices field to match the format expected by the REST API.

6.0.4

March 16, 2023
Modified
  • Change the settings for subscribe URLSession and limit the number of concurrent connections per host.
  • Call presence leave using subscribe URLSession to avoid potential presence race of condition.

6.0.3

January 4, 2023
Fixed
  • Fix issue because of which listener wasn't deinit even when reference on it has been nullified.

6.0.2

December 12, 2022
Fixed
  • Fix memory leak within Subscription Session.
Modified
  • Use specific GitHub action for .pubnub.yml validation.

6.0.1

September 5, 2022
Fixed
  • Fix issue because of which Example project didn't built with missing swift reference error.
  • Fix issue because of which Carthage was unable to build caused by schemas without targets.

6.0.0

July 5, 2022
Added
  • VSP methods and models have been exposed via modules on the PubNub instance.
  • FlatJSONCodable replaces [String: JSONCodableScalar] inside the VSP models.
Modified
  • PubNub instances has been changed from a struct to a class.
  • HTTPSession has been made public for easier per-request overrides of the Network Session.

5.1.0

February 2, 2022
Added
  • Add affected channels and groups under affected resources list.

5.0.1

January 19, 2022
Fixed
  • Fix issue because of which access token not updated in subscription session.

5.0.0

January 12, 2022
Modified
  • BREAKING CHANGES: Disable automated uuid generation and make it mandatory to specify during PubNubConfiguration instance creation.

4.1.2

November 8, 2021
Fixed
  • Make name field optional for channel and UUID metadata.

4.1.1

November 5, 2021
Fixed
  • Fix issue because of which request with applied mutators not used.

4.1.0

September 16, 2021
Added
  • Add ability to parse permissions from token provided by servers.
  • Make it possible to add component identifiers for requests.
Fixed
  • Fix bufferTooSmall and make temporary buffers for files encryption / decryption adaptive in size to provided stream buffer size.
  • Don't perform HEX-encoding of Data with FCM token which should be used as-is.
Modified
  • Use token instead of authKey (if specified) for query auth.

v4.0.2

August 3, 2021
Fixed
  • Memory leaks with captured request in subscription loop.

v4.0.1

July 7, 2021
Fixed
  • Subscribe Factory will hash additional values when comparing sessions
  • Adding APNS2 Devices will correctly return the devices that were added.
  • Per request configuration changes will correct be applied to the outgoing request.

v4.0.0

June 8, 2021
Added
  • BREAKING CHANGE: Crypto by default initialized with randomizeIV set to true which will encrypt / decrypt data with publish / subscribe / history API calls using randomized initialization vector
Modified
  • Add new sdks section to .pubnub.yml with information about available artifacts and distribution variants

v3.1.3

May 28, 2021
Modified
  • Custom error messages (from functions) will be included inside PubNub Error Details
Fixed
  • Fix Coding issue when setting UUIDMetadata objects

v3.1.2

April 30, 2021
Fixed
  • Subscribe Message events will have the correct messageType flag

v3.1.1

March 12, 2021
Fixed
  • FileEvents will contain the file name stored with PubNub and not the local filename (if different)
Modified
  • PubNub model objects are now Hashable

v3.1.0

October 6, 2020
Added
  • CryptoStream and CryptoInputStream can be used to perform crypto operations on streams of data
  • File upload/download support
  • Added includeUUID and includeMessageType flags to History
Modified
  • History will now has a default limit of 100 for single-channel and 25 for multichannel requests
  • Removed depcreated platform version support to align with Xcode 12 warnings

v3.0.1

June 25, 2020
Fixed
  • Fixed crash when performing many requests simulataneously

v3.0.0

June 17, 2020
Added
  • Added Objects v2 API and removed Objects v1 API
Modified
  • Replace PubNub API response objects with primitives or prtocols
  • Replace Subscribe Event objects with primitives or prtocols
  • Subscribe Listener now has a batched event handler
  • Renamed several APIs to align naming across all APIs
  • PubNubConfiguration properites can all be set through default init
  • Reduced access control of objects that are not public facing
  • Request level configuration available for most PubNub APIs

v2.5.4

June 25, 2020
Fixed
  • Fixed crash when performing many requests simulataneously

v2.5.3

June 9, 2020
Modified
  • Payload and FCMTarget fields are now optional for PubNubPushMessage
Fixed
  • Fixed an issue where nested presence state could be published

v2.5.2

June 4, 2020
Fixed
  • Resolves possible memory leaks related to listeners
  • Responds with the appropriate error when a Signal payload is too large
  • Added PAM support to Channels for Channel-Group endpoint
  • Invalid JSON will attempt to be parsed for the next Timetoken, and if successful will no interrupt the current subscription loop

v2.5.1

May 7, 2020
Fixed
  • Add uuid and channel to the Message Action Event
  • Fixed typos inside log messages
Modified
  • AnyJSON dictionaries can now perform a rawValue subscript that will return the underlying Any object

v2.5.0

March 26, 2020
Modified
  • Message Subscribe Events and Message History will now return the decrypted Data blob in the event it was decrypted, but couldn't be stringified
  • Crypto will now accept the type of String.Encoding to be used when converting between Data and String
  • Object API fetch|create|update methods with generic response objects have been added
  • Object API fetch|create|update methods with protocol response objects have been added
  • Object types User|Space|Member|Membership can now convert the underlying type using transocde(into:)
Fixed
  • Corrected the access control level of MembershipIdentifiable properties
  • User/Space Subscription Update events wouldn't properly handle partial object updates

v2.4.2

March 12, 2020
Fixed
  • Make region optional during originTimetoken parsing and set to 0 by default

v2.4.1

January 24, 2020
Fixed
  • A reconnecting event will be emitted once subscription starts retrying

v2.4.0

January 17, 2020
Added
  • PAM Token Management System added to manage Object API auth tokens
Fixed
  • HereNow Presence will now work when only groups are being used

v2.3.3

January 7, 2020
Fixed
  • Enable ability to send auth token on Presence endpoints

v2.3.2

December 9, 2019
Fixed
  • Subscription requests will now properly cancel when updating existing subscription loop

v2.3.1

December 3, 2019
Fixed
  • Duplicate subscription will no longer start if a current subscription is connecting
  • Added missing APNS2 pubnub config field to publish payload object
  • Fixed Coding issue when a scalar value is used for APNS2 publish payload object
  • Subscription will no long attempt to automatically reconnect after an unexpected disconnet

v2.3.0

November 25, 2019
Added
  • Added convenience objects for creating push publish messages
  • List/Add/Remove/Remove-All of APNS2 push channels for devices
Fixed
  • Channel property on push responses is not public

v2.2.0

November 14, 2019
Modified
  • Timetoken was changed from an Int64 to UInt64 to avoid negative timetoken values
  • Removed PubNubRouter, and replaced with multiple service specific HTTPRouter implementations
  • Removed Endpoint type
  • Renamed Response to EndpointResponse
  • Removed HTTPHeader & HTTPHeader, and replaced with [String: String]
  • Renamed Session to HTTPSession and made it an internal type
  • Created RequestReplaceable and made Request an internal type

v2.1.2

November 12, 2019
Fixed
  • PubNub Info.plist is now included on Cocoapod and Carthage deployed builds

v2.1.1

November 6, 2019
Fixed
  • Encoding JSONCodableScalar values will now properly encode to a single value
  • Membership APIs no longer use hardcoded subscribe key

v2.1.0

November 1, 2019
Added
  • Added support for Message Action Subscription Listener
  • Fetch previously published Message Actions and Messages via History APIs
  • Fetch previously published Message Actions on a channel
  • Add/Remove Message Actions on previously published messages

v2.0.2

October 25, 2019
Fixed
  • Add/Update documentation for public classes, methods, and properties

v2.0.1

October 21, 2019
Fixed
  • Update the version inside the podspec file

v2.0.0

October 17, 2019
Fixed
  • Subscribe/Unsubscribe will now properly cancel/restart the subscribe loop when completely stoppping cycle
  • Fixed memory leak inside Hearthbeat response handler
  • Fixed memory leak inside SubscriptionSessionFactory
Modified
  • PNError enum has been replaced by PubNubError struct to allow for greater flexibility in error handling and recognition
  • AnyJSON as been replaced by the JSONCodable protocol for method parameters allowing any conforming object to be passed
  • Removed initialized and cancelled as ConnectionsStatus options
  • Response error events due to cancellations will now be suppresed by default by the SubscriptionListener. They can be toggled on using a the supressCancellationErrors property
Added
  • Added subscription event listener for subscribe/unsubscribe changes

v1.2.1

October 15, 2019
Modified
  • Made the subscription token a property on the listener for cleaner setup

v1.2.0

October 8, 2019
Modified
  • Removed development dependencies from being included in Swift Package imports
  • Added meta event listener covering all event types
Added
  • Support for Objects added
Fixed
  • Changed ConnectionStatus.isActive and ConnectionStatus.isConnected access control to public
  • Fixed typo in PubNub.Push method parameters
  • Add support for Global HereNow
  • Fixed HereNow stateless response decoding
  • Fixed HereNow single channel response decoding

v1.1.0

September 3, 2019
Added
  • Add support for Signal Subscription Listener
  • Add support for Signal publish API
Fixed
  • Fixed crash attempting to create URLSessionTasks from invalidated URLSession
  • Default Encryption/Decryption methodology now properly aligns with other SDKs
  • ? characters inside URL query parameters will now be properly url encoded
Modified
  • Exposed add(listener:) to be called by PubNub instance directly

v1.0.0

August 23, 2019
Added
  • Initial release of native Swift PubNub SDK
Last updated on
On this page