diff --git a/CHANGELOG.md b/CHANGELOG.md index 0009e4f2..89e25e69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [10.1.6](https://github.com/pusher/pusher-websocket-swift/compare/10.1.5...10.1.6) - 2025-06-20 + +### Fixed + +- Upgrade NWWebSocket library to version 0.5.7 to fix reported crashes due to data race. + ## [10.1.3](https://github.com/pusher/pusher-websocket-swift/compare/10.1.2...10.1.3) - 2023-05-19 ### Fixed diff --git a/PusherSwift.podspec b/PusherSwift.podspec index 3be94396..62482869 100644 --- a/PusherSwift.podspec +++ b/PusherSwift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'PusherSwift' - s.version = '10.1.5' + s.version = '10.1.6' s.summary = 'A Pusher client library in Swift' s.homepage = 'https://github.com/pusher/pusher-websocket-swift' s.license = 'MIT' diff --git a/PusherSwiftWithEncryption.podspec b/PusherSwiftWithEncryption.podspec index c2b3adc6..c2a06d8f 100644 --- a/PusherSwiftWithEncryption.podspec +++ b/PusherSwiftWithEncryption.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'PusherSwiftWithEncryption' - s.version = '10.1.5' + s.version = '10.1.6' s.summary = 'A Pusher client library in Swift that supports encrypted channels' s.homepage = 'https://github.com/pusher/pusher-websocket-swift' s.license = 'MIT' diff --git a/README.md b/README.md index 0545ba90..a0f0036a 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' use_frameworks! -pod 'PusherSwift', '~> 10.1.0' +pod 'PusherSwift', '~> 10.1.6' ``` Then, run the following command: @@ -150,7 +150,7 @@ let package = Package( targets: ["YourPackage"]), ], dependencies: [ - .package(url: "https://github.com/pusher/pusher-websocket-swift.git", from: "10.1.0"), + .package(url: "https://github.com/pusher/pusher-websocket-swift.git", from: "10.1.6"), ], targets: [ .target( @@ -609,7 +609,7 @@ PusherChannel *myChannel = [pusher subscribeWithChannelName:@"my-channel"]; This returns PusherChannel object, which events can be bound to. -For non-presence channels, you can also provide a function that will be called when a client either subscribes or unsubscribes to a channel with the number of subscribers as a parameter. Also, this function is available as a parameter to `subscribe` function. +For non-presence channels, you can also provide a function that will be called when a client either subscribes or unsubscribes to a channel with the number of subscribers as a parameter. Also, this function is available as a parameter to `subscribe` function. ```swift let onSubscriptionCountChanged = { (count: Int) in @@ -644,9 +644,9 @@ Subscribing to private channels involves the client being authenticated. See the Similar to Private channels, you can also subscribe to a [private encrypted channel](https://pusher.com/docs/channels/using_channels/encrypted-channels). This library now fully supports end-to-end encryption. This means that only you and your connected clients will be able to read your messages. Pusher cannot decrypt them. -Like with private channels, you must provide an authentication endpoint. That endpoint must be using a [server client that supports end-to-end encryption](https://pusher.com/docs/channels/using_channels/encrypted-channels#server). There is a [demonstration endpoint to look at using nodejs](https://github.com/pusher/pusher-channels-auth-example#using-e2e-encryption). +Like with private channels, you must provide an authentication endpoint. That endpoint must be using a [server client that supports end-to-end encryption](https://pusher.com/docs/channels/using_channels/encrypted-channels#server). There is a [demonstration endpoint to look at using nodejs](https://github.com/pusher/pusher-channels-auth-example#using-e2e-encryption). -The shared secret used to decrypt events is loaded from the same auth endpoint request that is used to authorize your subscription. There is also a mechanism for reloading the shared secret if your encryption master key changes. If an event is encountered that cannot be decrypted, a request is made to your auth endpoint to attempt to load the new shared secret. If that request fails or if the returned secret still cannot decrypt the event then that event will be skipped, the `failedToDecryptEvent` connection delegate function will be called, and the next received event will be processed. +The shared secret used to decrypt events is loaded from the same auth endpoint request that is used to authorize your subscription. There is also a mechanism for reloading the shared secret if your encryption master key changes. If an event is encountered that cannot be decrypted, a request is made to your auth endpoint to attempt to load the new shared secret. If that request fails or if the returned secret still cannot decrypt the event then that event will be skipped, the `failedToDecryptEvent` connection delegate function will be called, and the next received event will be processed. Because of the requirement to reload the shared secret on demand, you can only use the following [auth methods](#configuration): `endpoint`, `authRequestBuilder`, `authorizer`. It is not possible to pass an instance of `PusherAuth` to the `subscribe` function if you are subscribing to an encrypted channel. @@ -833,7 +833,7 @@ Events can be bound to at 2 levels; globally and per channel. When binding to an ### Per-channel events -These are bound to a specific channel, and mean that you can reuse event names in different parts of your client application. +These are bound to a specific channel, and mean that you can reuse event names in different parts of your client application. #### Swift @@ -894,7 +894,7 @@ PusherChannel *chan = [pusher subscribeWithChannelName:@"my-channel"]; ### Global events -You can attach behavior to these events regardless of the channel the event is broadcast to. +You can attach behavior to these events regardless of the channel the event is broadcast to. #### Swift @@ -1005,7 +1005,7 @@ myChannel.bind(eventName: "price-update", eventCallback: { (event: PusherEvent) ``` -Alternatively, you could use [`JSONSerialization`](https://developer.apple.com/documentation/foundation/jsonserialization) to decode the JSON into Swift data types: +Alternatively, you could use [`JSONSerialization`](https://developer.apple.com/documentation/foundation/jsonserialization) to decode the JSON into Swift data types: #### Swift @@ -1073,7 +1073,7 @@ pusher.bind({ (message: Any?) in ``` #### Objective-C - + ```objc [pusher bind:^void (NSDictionary *data) { NSString *eventName = data[@"event"]; diff --git a/Sources/Info.plist b/Sources/Info.plist index afab4c54..9d01a05d 100644 --- a/Sources/Info.plist +++ b/Sources/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 10.1.5 + 10.1.6 CFBundleSignature ???? CFBundleVersion diff --git a/Sources/PusherSwift.swift b/Sources/PusherSwift.swift index 11261916..5a2a63e5 100644 --- a/Sources/PusherSwift.swift +++ b/Sources/PusherSwift.swift @@ -2,7 +2,7 @@ import Foundation import NWWebSocket let PROTOCOL = 7 -let VERSION = "10.1.5" +let VERSION = "10.1.6" // swiftlint:disable:next identifier_name let CLIENT_NAME = "pusher-websocket-swift" diff --git a/Tests/Info.plist b/Tests/Info.plist index cef42959..ba81c7fb 100644 --- a/Tests/Info.plist +++ b/Tests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 10.1.5 + 10.1.6 CFBundleSignature ???? CFBundleVersion diff --git a/Tests/Integration/PusherClientInitializationTests.swift b/Tests/Integration/PusherClientInitializationTests.swift index 1380cd1f..d3a8f680 100644 --- a/Tests/Integration/PusherClientInitializationTests.swift +++ b/Tests/Integration/PusherClientInitializationTests.swift @@ -2,7 +2,7 @@ import XCTest @testable import PusherSwift -let VERSION = "10.1.5" +let VERSION = "10.1.6" class ClientInitializationTests: XCTestCase { private var key: String!