From 05b01080200bd1832ef4b7cb098e3d61d43028b0 Mon Sep 17 00:00:00 2001 From: dsrees Date: Fri, 5 Nov 2021 12:06:26 -0400 Subject: [PATCH] Prepare version 3.0.0 --- CHANGELOG.md | 9 +++++++-- Sources/SwiftPhoenixClient/Message.swift | 2 +- SwiftPhoenixClient.podspec | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4e4a3ad..6f7ffb90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,13 @@ All notable changes to this project will be documented in this file. The format This product uses [Semantic Versioning](https://semver.org/). -## 2.2.0 -* **BREAKING**: Properly handle a `phx_reply` response by hiding the nested payload from the client and only returning the `response` for `Message.payload`. For convenince, `Message.rawPayload` has been provided which will behave the same as `Message.payload` in earlier versions. + + +## 3.0.0 +This ia a **BREAKING** release. The following has changed to properly matched the phoenix.js library +* `message.payload.response` is now automatically unwrapped and returned as `message.payload` for `phx_reply` events. +* The client now, be default, uses the JSON V2 Serializer which was added in phoenix 1.3. If you are still running 1.2 or earlier, then you will need to +continue using SwiftPhoenixClient 2.1.0, or provide your own custom `vsn`, `encoder` and `decoder` to the `Socket` class. ## 2.1.1 * Fixed HeartbeatTimer to add thread safety and fix crash reported in #188 diff --git a/Sources/SwiftPhoenixClient/Message.swift b/Sources/SwiftPhoenixClient/Message.swift index ed2d8ae6..c2fa4553 100644 --- a/Sources/SwiftPhoenixClient/Message.swift +++ b/Sources/SwiftPhoenixClient/Message.swift @@ -37,7 +37,7 @@ public class Message { /// The raw payload from the Message, including a nested response from /// phx_reply events. It is recommended to use `payload` instead. - public let rawPayload: Payload + internal let rawPayload: Payload /// Message payload public var payload: Payload { diff --git a/SwiftPhoenixClient.podspec b/SwiftPhoenixClient.podspec index 23252233..f9ae7c18 100644 --- a/SwiftPhoenixClient.podspec +++ b/SwiftPhoenixClient.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "SwiftPhoenixClient" - s.version = "2.2.0" + s.version = "3.0.0" s.summary = "Connect your Phoenix and iOS applications through WebSockets!" s.swift_version = "5.0" s.description = <<-EOS