From 602fb53f4f9e1b7b709d47e0423e2e3508b001ef Mon Sep 17 00:00:00 2001 From: acarioni Date: Mon, 7 Nov 2022 14:35:24 +0100 Subject: [PATCH] release v5.0.0 --- CHANGELOG.md | 8 +++---- LightstreamerClient.podspec | 2 +- README.md | 24 +++++++++---------- .../LightstreamerClient/utils/Constants.swift | 10 ++++---- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 625e4b9..1da99c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,18 +1,18 @@ # SDK for Swift Clients CHANGELOG -## xxxxxxxxxx +## 5.0.0 _Compatible with Lightstreamer Server since 7.3.0._
_Compatible with code developed for the previous versions._
-_Released on xxxxxxxxxx._ +_Released on 7 Nov 2022._ Improved the "delta delivery" mechanism, by adding the support for value differences, as per the extension introduced in Server version 7.3.0. -Currently only differences in JSON Patch format are supported. +Currently two "diff" formats are supported: JSON Patch and TLCP-diff. Added the getValueAsJSONPatchIfAvailable function in the ItemUpdate class, to take advantage of the new support for JSON Patch differences, which may prove useful in some use cases. -See the JSDocs for details. +See the Docs for details. ## 5.0.0 beta 4 diff --git a/LightstreamerClient.podspec b/LightstreamerClient.podspec index 699e086..e310642 100644 --- a/LightstreamerClient.podspec +++ b/LightstreamerClient.podspec @@ -1,7 +1,7 @@ # NB keep in sync with Package.swift Pod::Spec.new do |s| s.name = 'LightstreamerClient' - s.version = '5.0.0-beta.4' + s.version = '5.0.0' s.summary = 'Lightstreamer Swift Client SDK' s.homepage = 'https://github.com/Lightstreamer/Lightstreamer-lib-client-swift' s.license = { :type => 'Apache 2.0', :file => 'LICENSE.md' } diff --git a/README.md b/README.md index c7a7ae5..dfa721c 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ If you prefer not to use any of the aforementioned dependency managers, you can ## Quickstart -To connect to a Lightstreamer Server, a [LightstreamerClient](https://lightstreamer.com/api/ls-swift-client/5.0.0-beta.4/Classes/LightstreamerClient.html) object has to be created, configured, and instructed to connect to the Lightstreamer Server. +To connect to a Lightstreamer Server, a [LightstreamerClient](https://lightstreamer.com/api/ls-swift-client/5.0.0/Classes/LightstreamerClient.html) object has to be created, configured, and instructed to connect to the Lightstreamer Server. A minimal version of the code that creates a LightstreamerClient and connects to the Lightstreamer Server on *https://push.lightstreamer.com* will look like this: ```swift @@ -79,7 +79,7 @@ let client = LightstreamerClient(serverAddress: "https://push.lightstreamer.com/ client.connect() ``` -For each subscription to be subscribed to a Lightstreamer Server a [Subscription](https://lightstreamer.com/api/ls-swift-client/5.0.0-beta.4/Classes/Subscription.html) instance is needed. +For each subscription to be subscribed to a Lightstreamer Server a [Subscription](https://lightstreamer.com/api/ls-swift-client/5.0.0/Classes/Subscription.html) instance is needed. A simple Subscription containing three items and two fields to be subscribed in *MERGE* mode is easily created (see [Lightstreamer General Concepts](https://www.lightstreamer.com/docs/ls-server/latest/General%20Concepts.pdf)): ```swift @@ -91,7 +91,7 @@ sub.requestedSnapshot = .yes client.subscribe(sub) ``` -Before sending the subscription to the server, usually at least one [SubscriptionDelegate](https://lightstreamer.com/api/ls-swift-client/5.0.0-beta.4/Protocols/SubscriptionDelegate.html) is attached to the Subscription instance in order to consume the real-time updates. The following code shows the values of the fields *stock_name* and *last_price* each time a new update is received for the subscription: +Before sending the subscription to the server, usually at least one [SubscriptionDelegate](https://lightstreamer.com/api/ls-swift-client/5.0.0/Protocols/SubscriptionDelegate.html) is attached to the Subscription instance in order to consume the real-time updates. The following code shows the values of the fields *stock_name* and *last_price* each time a new update is received for the subscription: ```swift class SubscriptionDelegateImpl: SubscriptionDelegate { @@ -110,9 +110,9 @@ Mobile Push Notifications (MPN) are based on [Apple Push Notification Service te Before you can use MPN services, you need to - register your app with APNs (read carefully the documentation about [Setting Up a Remote Notification Server](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server)); -- configure the Lightstreamer MPN module (read carefully the section *5 Mobile and Web Push Notifications* in the [General Concepts guide](https://lightstreamer.com/docs/ls-server/7.2.0/General%20Concepts.pdf)). +- configure the Lightstreamer MPN module (read carefully the section *5 Mobile and Web Push Notifications* in the [General Concepts guide](https://lightstreamer.com/docs/ls-server/7.3.0/General%20Concepts.pdf)). -After you have an APNs account, you can create a [MPN device](https://lightstreamer.com/api/ls-swift-client/5.0.0-beta.4/Classes/MPNDevice.html), which represents a specific app running on a specific mobile device. +After you have an APNs account, you can create a [MPN device](https://lightstreamer.com/api/ls-swift-client/5.0.0/Classes/MPNDevice.html), which represents a specific app running on a specific mobile device. The following snippet shows a sample implementation of the iOS app delegate methods needed to register for remote notifications and receive the corresponding token. @@ -135,7 +135,7 @@ func application(_ application: UIApplication, } ``` -To receive notifications, you need to subscribe to a [MPN subscription](https://lightstreamer.com/api/ls-swift-client/5.0.0-beta.4/Classes/MPNSubscription.html): it contains subscription details and the listener needed to monitor its status. Real-time data is routed via native push notifications. +To receive notifications, you need to subscribe to a [MPN subscription](https://lightstreamer.com/api/ls-swift-client/5.0.0/Classes/MPNSubscription.html): it contains subscription details and the listener needed to monitor its status. Real-time data is routed via native push notifications. ```swift let builder = MPNBuilder() @@ -155,13 +155,13 @@ sub.triggerExpression = "Double.parseDouble($[2])>45.0" client.subscribeMPN(sub, coalescing: true) ``` -The notification format lets you specify how to format the notification message. It can contain a special syntax that lets you compose the message with the content of the subscription updates (see §5.4.1 of the [General Concepts guide](https://lightstreamer.com/docs/ls-server/7.2.0/General%20Concepts.pdf) ). +The notification format lets you specify how to format the notification message. It can contain a special syntax that lets you compose the message with the content of the subscription updates (see §5.4.1 of the [General Concepts guide](https://lightstreamer.com/docs/ls-server/7.3.0/General%20Concepts.pdf) ). -The optional trigger expression lets you specify when to send the notification message: it is a boolean expression, in Java language, that when evaluates to true triggers the sending of the notification (see §5.4.2 of the [General Concepts guide](https://lightstreamer.com/docs/ls-server/7.2.0/General%20Concepts.pdf)). If not specified, a notification is sent each time the Data Adapter produces an update. +The optional trigger expression lets you specify when to send the notification message: it is a boolean expression, in Java language, that when evaluates to true triggers the sending of the notification (see §5.4.2 of the [General Concepts guide](https://lightstreamer.com/docs/ls-server/7.3.0/General%20Concepts.pdf)). If not specified, a notification is sent each time the Data Adapter produces an update. ## Logging -To enable the internal client logger, create an instance of [LoggerProvider](https://lightstreamer.com/api/ls-swift-client/5.0.0-beta.4/Protocols/LSLoggerProvider.html) and set it as the default provider of [LightstreamerClient](https://lightstreamer.com/api/ls-swift-client/5.0.0-beta.4/Classes/LightstreamerClient.html). +To enable the internal client logger, create an instance of [LoggerProvider](https://lightstreamer.com/api/ls-swift-client/5.0.0/Protocols/LSLoggerProvider.html) and set it as the default provider of [LightstreamerClient](https://lightstreamer.com/api/ls-swift-client/5.0.0/Classes/LightstreamerClient.html). ```swift let loggerProvider = ConsoleLoggerProvider(level: .debug) @@ -169,15 +169,15 @@ LightstreamerClient.setLoggerProvider(loggerProvider) ``` ## Compatibility -Compatible with Lightstreamer Server since version 7.2.0. +Compatible with Lightstreamer Server since version 7.3.0. ## Documentation - [Live demos](https://demos.lightstreamer.com/?p=lightstreamer&t=client&lclient=apple&sclientapple=ios&sclientapple=macos&sclientapple=tvos&sclientapple=watchos) -- [API Reference](https://lightstreamer.com/api/ls-swift-client/5.0.0-beta.4/index.html) +- [API Reference](https://lightstreamer.com/api/ls-swift-client/5.0.0/index.html) -- [Lightstreamer General Concepts](https://lightstreamer.com/docs/ls-server/7.2.0/General%20Concepts.pdf) +- [Lightstreamer General Concepts](https://lightstreamer.com/docs/ls-server/7.3.0/General%20Concepts.pdf) ## Support diff --git a/Sources/LightstreamerClient/utils/Constants.swift b/Sources/LightstreamerClient/utils/Constants.swift index ebdacb2..10f4dd3 100644 --- a/Sources/LightstreamerClient/utils/Constants.swift +++ b/Sources/LightstreamerClient/utils/Constants.swift @@ -1,16 +1,16 @@ import Foundation #if os(macOS) -let LS_CID = "scFuxkwp1ltvcB4BJ4JikvDAj" +let LS_CID = "scFuxkwp1ltvcB4BJ4n" #elseif os(tvOS) -let LS_CID = "zxRyen2m uz.k55AK1xlzcjn" +let LS_CID = "zxRyen2m uz.k55AKr" #elseif os(watchOS) -let LS_CID = ".cWimz9dysogQz2GJ4L73dHzfFo" +let LS_CID = ".cWimz9dysogQz2GJ4L7s" #else -let LS_CID = "oqVfhw.i6 37e64BHf g6j" +let LS_CID = "oqVfhw.i6 37e64Bn" #endif let LS_LIB_NAME = "swift_client" -let LS_LIB_VERSION = "5.0.0 beta4" +let LS_LIB_VERSION = "5.0.0" let TLCP_VERSION = "TLCP-2.4.0" let FULL_TLCP_VERSION = TLCP_VERSION + ".lightstreamer.com"