Skip to content

Commit c1214f8

Browse files
authored
v8.0.0
1 parent 67aedfd commit c1214f8

8 files changed

+31
-12
lines changed

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,22 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased](https://github.com/pusher/pusher-websocket-swift/compare/7.2.0...HEAD)
7+
## [Unreleased](https://github.com/pusher/pusher-websocket-swift/compare/8.0.0...HEAD)
8+
9+
## [8.0.0](https://github.com/pusher/pusher-websocket-swift/compare/7.2.0...8.0.0) - 2020-04-27
10+
11+
### Added
12+
13+
- Added support for [end-to-end encryption](https://pusher.com/docs/channels/using_channels/encrypted-channels). There is a new target: `PusherSwiftWithEncryption` and a new dependency for that target `Sodium`. The original `PusherSwift` target does not require `Sodium` and has all the same features as `PusherSwiftWithEncryption` except the ability to decrypt events. You can find details about how to use `PusherSwiftWithEncryption` in the [README](https://github.com/pusher/pusher-websocket-swift#private-encrypted-channels-beta). As part of this feature, there is a new function in the `PusherDelegate`: `failedToDecryptEvent`, and channel names prefixed with `private-encrypted-` are now interpreted as encrypted channels in both targets.
14+
15+
### Changed
16+
17+
- The `encrypted` parameter for `PusherClientOptions` has been renamed to `useTLS`. Its behavior and default value (`true`) are unchanged.
18+
- Updated to Swift 5.0 and updated dependencies ([@JonathanDowning](https://github.com/JonathanDowning)).
19+
20+
### Removed
21+
22+
- CryptoSwift is no longer a dependency.
823

924
## [7.2.0](https://github.com/pusher/pusher-websocket-swift/compare/7.1.0...7.2.0) - 2019-10-18
1025

PusherSwift.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'PusherSwift'
3-
s.version = '7.2.0'
3+
s.version = '8.0.0'
44
s.summary = 'A Pusher client library in Swift'
55
s.homepage = 'https://github.com/pusher/pusher-websocket-swift'
66
s.license = 'MIT'

PusherSwiftWithEncryption.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'PusherSwiftWithEncryption'
3-
s.version = '7.2.0'
3+
s.version = '8.0.0'
44
s.summary = 'A Pusher client library in Swift that supports encrypted channels'
55
s.homepage = 'https://github.com/pusher/pusher-websocket-swift'
66
s.license = 'MIT'

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ source 'https://github.com/CocoaPods/Specs.git'
7979
platform :ios, '10.0'
8080
use_frameworks!
8181

82-
pod 'PusherSwift', '~> 7.2'
82+
pod 'PusherSwift', '~> 8.0'
8383
```
8484

8585
Then, run the following command:
@@ -141,7 +141,7 @@ let package = Package(
141141
targets: ["YourPackage"]),
142142
],
143143
dependencies: [
144-
.package(url: "https://github.com/pusher/pusher-websocket-swift.git", from: "7.2.0"),
144+
.package(url: "https://github.com/pusher/pusher-websocket-swift.git", from: "8.0.0"),
145145
],
146146
targets: [
147147
.target(
@@ -618,15 +618,19 @@ Subscribing to private channels involves the client being authenticated. See the
618618
619619
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.
620620
621-
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. Because of the requirement to reload the shared secret on demand, you can only use the following [auth method](#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.
621+
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).
622+
623+
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.
624+
625+
Because of the requirement to reload the shared secret on demand, you can only use the following [auth method](#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.
622626
623627
### Installation
624628
625629
#### CocoaPods
626-
Importing using CocoaPods will require a separate pod which has not yet been published.
630+
Update your podfile to include `PusherSwiftWithEncryption` instead of `PusherSwift`.
627631
628632
#### Carthage
629-
You do not need to change your Cartfile. However, you will need to import the `PusherSwiftWithEncryption` framework into your project, instead of PusherSwift. You will also need to import the `Sodium` framework into your project.
633+
You do not need to change your Cartfile. However, you will need to import the `PusherSwiftWithEncryption` framework into your project, instead of `PusherSwift`. You will also need to import the `Sodium` framework into your project.
630634
631635
#### Swift Package Manager
632636
PusherSwiftWithEncryption is not yet compatible with the Swift Package Manager.

Sources/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>7.2.0</string>
18+
<string>8.0.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

Sources/PusherSwift.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Foundation
22
import Starscream
33

44
let PROTOCOL = 7
5-
let VERSION = "7.2.0"
5+
let VERSION = "8.0.0"
66
let CLIENT_NAME = "pusher-websocket-swift"
77

88
@objcMembers

Tests/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>BNDL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>7.2.0</string>
18+
<string>8.0.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

Tests/PusherClientInitializationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import XCTest
66
@testable import PusherSwift
77
#endif
88

9-
let VERSION = "7.2.0"
9+
let VERSION = "8.0.0"
1010

1111
class ClientInitializationTests: XCTestCase {
1212
var key: String!

0 commit comments

Comments
 (0)