All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
10.1.10 - 2026-03-10
- Upgrade NWWebSocket to 0.5.10 to treat all POSIX errors as disconnections, fixing zombie connections caused by ENODATA (96) and other unrecognised error codes
10.1.9 - 2025-12-09
- Switched TweetNacl dependency to Pusher's own fork for Xcode 16+ compatibility
10.1.8 - 2025-12-05
- Upgrade NWWebSocket library to version 0.5.9 to support tvos
10.1.7 - 2025-12-05
- Upgrade NWWebSocket library to version 0.5.8 to fix reconnections getting stuck after network disruptions
10.1.6 - 2025-06-20
- Upgrade NWWebSocket library to version 0.5.7 to fix reported crashes due to data race.
10.1.3 - 2023-05-19
- Memory Leak on NWWebSocket library
10.1.2 - 2022-11-10
- Ensure latest authorization signature on reconnect.
10.1.1 - 2022-07-28
- Migrate to Github Actions.
10.1.0 - 2022-07-15
onSubscriptionCountChanged(count:Int)method to handlepusher_internal:subscription_countevent
- SwiftLint from SPM's package.swift.
10.0.1 - 2022-03-23
- Prevent reconnection after intentional disconnection
10.0.0 - 2021-07-08
- The library now supports watchOS 6.0 and above.
- Auto-generated API docs.
- The deprecated
bind(_ callback:)method onPusherhas been removed. - The deprecated
bind(eventName:callback:)method onPusherChannelhas been removed.
9.2.2 - 2021-03-11
- Resolved an issue preventing App Store submission when integrating the SDK using certain dependency managers.
9.2.1 - 2021-03-04
- Marked the legacy
bind(_ callback:)method onPusheras deprecated. - Marked the legacy
bind(eventName:callback:)method onPusherChannelas deprecated.
9.2.0 - 2021-01-15
- Added an optional
pathparameter toPusherClientOptionsto specify custom additional path components.
- All debugging messages are now sent via
debugLog(message: String)(previously there were some messages which weren't sent this way).
- The
subscribedparameter on aPusherChannelis now set tofalsewhen callingunsubscribe(_ channelName: String). - Enhanced thread safety for common operations: subscribing / unsubscribing with channels, and binding / unbinding with events.
9.1.1 - 2020-12-15
- Resolved a race condition that could prevent automatic reconnection attempts in certain circumstances.
9.1.0 - 2020-12-07
- Encrypted channels are now support by default by the
PusherSwifttarget. - Encrypted channels are now supported if integrating the SDK via Swift Package Manager.
- tvOS as a target platform is now supported regardless of if encrypted channels are used.
- tweetnacl-swiftwrap is now a dependency.
- Migrated the WebSocket client code to use our NWWebSocket library.
- Improvements to WebSocket reconnection functionality for unstable connections, or connections which migrate from Wi-Fi to Cellular (or vice versa).
- The
PusherSwiftWithEncryptiontarget has been removed. - Reachability is no longer a dependency.
9.0.0 - 2020-10-09
- Connects to Pusher servers using a WebSocket client that is fully-native code.
- Pusher Channels Protocol closure codes are now respected when attempting to reconnect to Pusher servers after a disconnection.
- The
autoReconnectoption is now ignored if a received closure code is from the Channels Protocol closure code range. - The SDK minimum deployment targets are now: iOS 13.0, macOS 10.15 and tvOS 13.0.
- Fixed some typos in the README.
- Removed BETA label for Private encrypted channels feature in the README.
- Clarified in the README which frameworks to import in your project if you are integrating the SDK using Carthage.
- Starscream is no longer a dependency.
8.0.0 - 2020-04-27
- Added support for end-to-end encryption. There is a new target:
PusherSwiftWithEncryptionand a new dependency for that targetSodium. The originalPusherSwifttarget does not requireSodiumand has all the same features asPusherSwiftWithEncryptionexcept the ability to decrypt events. You can find details about how to usePusherSwiftWithEncryptionin the README. As part of this feature, there is a new function in thePusherDelegate:failedToDecryptEvent, and channel names prefixed withprivate-encrypted-are now interpreted as encrypted channels in both targets.
- The
encryptedparameter forPusherClientOptionshas been renamed touseTLS. Its behavior and default value (true) are unchanged. - Updated to Swift 5.0 and updated dependencies (@JonathanDowning).
- CryptoSwift is no longer a dependency.
7.2.0 - 2019-10-18
- Added support for Swift Package Manager (@JonathanDowning).
- Fixed a compilation warning caused by incorrect parameter names in documentation comments (@funkyboy).
7.1.0 - 2019-10-03
- Added new
bindfunctions which accept a callback that receives aPusherEvent. APusherEventrepresents an event received from the websocket and has properties containing the event name, channel name and data. In addition,PusherEventhas a new property,userId, which allows you to verify the ID of the user who triggered a client event on a presence channel. You can read more about this feature in the docs. All the oldbindfunctions are still available for backwards compatibility. Thedataproperty ofPusherEventis not automatically parsed from JSON and you can decide to parse that as required. The parsing behavior is unchanged for data passed to callbacks bound by the oldbindfunctions.
- Updated the deployment targets so they are consistent regardless of whether you import the library using CocoaPods or Carthage.
7.0.0 - 2019-04-16
- Updated to Swift 4.2.
- Updated dependencies to newer versions, but pinned dependencies before any Swift 5 versions for compatibility with older versions of Xcode (@cowgp).
- Removed push notifications beta (replaced by Pusher Beams which has its own libraries).
- Removed TaskQueue dependency (used by push notifications beta).
- Fixed issues compiling the library with Swift 5/Xcode 10.2.
- Fixed issue related to the capturing of self in Reachability callbacks (@PorterHoskins).
- Fixed unreliable tests.
6.1.0 - 2018-05-18
- Reverted to using upstream version of Starscream instead of fork.
6.0.0 - 2018-04-04
- Client will now send a ping to the server if there has been a period of inactivity on the socket. This should help detect some disconnections that previously weren't being noticed.
- All dependencies are now defined to be brought in using the appropriate package manager (Carthage or CocoaPods)
- Reconnection strategy has been changed to now attempt reconnecting indefinitely, with an exponential backoff but a maximum interval of 120 seconds between reconnection attempts.
- Removed the deprecated
AuthRequestBuilderProtocolfunction:func requestFor(socketID: String, channel: PusherChannel) -> NSMutableURLRequest? reconnectingWhenNetworkBecomesReachableconnection state
5.1.1 - 2018-01-22
- Updated Starscream and CryptoSwift based code. Starscream is at roughly 3.0.4 and CryptoSwift at roughly 0.8.1.
5.1.0 - 2017-11-23
setSubscriptionsmethod.
- Swift 4 support.
- Updated CryptoSwift-based code.
- Swift 3.2 support (requires Xcode 9+).
- Updated Starscream dependency (commit SHA 789264eef). Fixes #115.
- Added
Authorizerprotocol that permits a new authorization method for channels requiring it (private and presence channels).
- Reverted change introduced in 4.0.2 that set up a custom callback queue for the underlying websocket
- Added the ability to provide auth values on channel subscriptions
- Updated Starscream dependency to latest version (commit SHA ee993322c)
- Encode channel names to be consistent with other libraries
- Fixed
membersproperty not being set beforesubscription_succeededevent callbacks were called for presence channels (@ichibod)
- Fixed memory leak issues with
PusherConnectionandPusherDelegate(@anlaital) - Deprecated
requestForinAuthRequestBuilderProtocolthat returnsNSMutableURLRequest? - Added
requestForinAuthRequestBuilderProtocolthat takes achannelNameStringinstead of aPusherChannelinstance, and returnsURLRequest?(@Noobish1)
- Made code required for push notifications available on macOS platform (i.e. push notifications work on macOS!) (@jameshfisher)
- Removed
PusherConnectionDelegateand moved all delegate functions into unifiedPusherDelegate - Renamed most delegate functions:
didRegisterForPushNotifications(clientId: String)->registeredForPushNotifications(clientId: String)didSubscribeToInterest(named name: String)->subscribedToInterest(name: String)didUnsubscribeFromInterest(named name: String)->unsubscribedFromInterest(name: String)connectionStateDidChange?(from: oldState, to: newState)->changedConnectionState(from old: ConnectionState, to new: ConnectionState)subscriptionDidSucceed?(channelName: channelName)->subscribedToChannel(name: String)subscriptionDidFail?(channelName: channelName, response: response, data: data, error: error)->failedToSubscribeToChannel(name: String, response: URLResponse?, data: String?, error: NSError?)
- Added macOS Example Swift project that contains an example macOS app to demo push notifications (requires setting up with your own Pusher app)
- Update CryptoSwift and Starscream dependencies
- Made
NativePushernot be a singleton anymore - Fixed
taskQueuecrash (#96)
- Authentication requests that result in any status code other that 200 or 201 are now treated as failures (previously any 2xx status code was treated as a success)
- Add a
findPresencefunction to thePusherPresenceChannelclass - Make docs for working with presence channels much clearer
- Fix bug in NativePusher where subscription modification requests would fail but not call the appropriate branch of the
guardstatement - Add
PusherDelegate, which includes optional functions related to Push Notification-related events - Added TaskQueue and refactored how subscribe / unsubscribe events are sent to the Push Notifications service (to make it thread-safe)
- Added tests for NativePusher-related code paths
- Update to work with Swift 3
- Rewrote all tests using XCTest
- Remove all need for Podfile / Cartfile when building PusherSwift locally
- Combine different builds into single target
- Merge in native notification code into main branch (push-notifications branch)
- Consolidate connection-related handlers / callbacks into
PusherConnectionDelegate - Make
requestForinAuthRequestBuilderProtocolable to fail - Rename
PresencePusherChannel->PusherPresenceChannel - Rename
PresenceChannelMember->PusherPresenceChannelMember - Rename
internalauthMethodenum case toinline - Add Obj-C compatibility
- Add iOS Obj-C example app
- Add
subscribeToPresenceChannelmethod
- Fix potential forceful unwrapping of a nil in debug logging when reconnecting (thanks to @psycotica0 for the spot)
- Made the
Pusherinitializer take an instance of aPusherClientOptionsstruct (@Noobish1) - Authenticating channels can now be achieved by: specifying an auth endpoint, providing an auth request builder (which conforms to the
AuthRequestBuilderprotocol), or by providing your app's secret (not for production) (@Noobish1) - Made the code Swiftier in general, e.g.
PusherChannelTypeenum (@Noobish1) - More robust reconnect (#66 - thanks to @psycotica0 for review)
- Added two new connection state cases:
ReconnectingandReconnectingWhenNetworkBecomesReachable - Added
reconnectAttemptsMaxandmaxReconnectGapInSecondsfor tweaking specifics of reconnection logic - Receiving Pusher-related errors by binding to the event name
pusher:erroron the client now works
- Add
onMemberAdded,onMemberRemoved,findMember, andmefunctions to PusherPresenceChannel class - Bring CryptoSwift, Starscream and Reachability dependencies inside the PusherSwift library
- Update Quick and Nimble dependencies to remove warnings for Swift compatibility
- Use cocoapods version 1.0.0 on Travis
- Split up
PusherSwift.swiftandPusherSwiftTests.swiftinto components - Add inline documentation throughout codebase
- Added
debugLoggeroption to client - Handling of
pusher:errormessages now works as it should have done all along - Building with Carthage now now longer requires a
pod installto make it work - Fix bug in
ConnectionStateChangeDelegate - Pass authorization errors to client (@psycotica0)
- Use cocoapods version 1.0.0.beta.6 to make builds work on Travis
- Use Xcode 7.3 image and updated simulators on Travis
- Update CryptoSwift to 0.3.1 and Starscream to 1.1.3 (largely for Swift 2.2 compatibility)
- Add ConnectionStateChangeDelegate and associated docs & tests
- Use cocoapods version 1.0.0.beta.5 to make builds work on Travis
- Update CryptoSwift to 0.2.3
- Update Starscream to 1.1.2
- Add
clusteroption to client initialiser options dictionary - Fix autoreconnect bugs (@bdolman)
- Make
pusher:subscription_succeededevent accessible (@bdolman)
- Make
unsentEventsan array instead of a dictionary (fixes #29)
- Fix building for Carthage
- Update
TARGETED_DEVICE_FAMILYfor tvOS target to be correct (3)
- Remove Pods directory from repo
- Change iOS deployment target to 8.0
- Use cocoapods version 1.0.0.beta.2 to make builds work on Travis
- Add platform-specific builds for iOS, tvOS, OSX
- Add build and test schemes for platform-specific builds
- Update Starscream to 1.1.1
- POST auth parameter with HTTP Body (@ngs)
- Add support for tvOS as platform (@goose2460)
- Update CryptoSwift to 0.2.2 (@goose2460)
- Update ReachabilitySwift to 2.3.3 (@goose2460)
- Rename
Sourcesback toSource
- Fixed build errors with Carthage
- Rename
SourcetoSourcesin order to work with Swift Package Manager (in principle) - Make headers for PusherSwift and PusherSwiftTests targets public