diff --git a/README.md b/README.md index 6600b16..27352ef 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ This SDK is also meant to replace and evolve all the Client SDKs targeted to the | Platform | Minimum Swift Version | Installation | Status | | --- | --- | --- | --- | -| iOS 11.0+ / macOS 10.13+ / tvOS 12.0+ / watchOS 5.0+ / visionOS 1.0+ | 5.1 | [Swift Package Manager](#swift-package-manager), [Manual](#manually),[CocoaPods](#cocoapods) | Fully Tested | +| iOS 12.0+ / macOS 10.13+ / tvOS 12.0+ / watchOS 5.0+ / visionOS 1.0+ | 5.1 | [Swift Package Manager](#swift-package-manager), [Manual](#manually),[CocoaPods](#cocoapods) | Fully Tested | ## Installation @@ -29,7 +29,7 @@ Once you have your Swift package set up, adding Lightstreamer Swift Client SDK a ```swift dependencies: [ - .package(url: "https://github.com/Lightstreamer/Lightstreamer-lib-client-swift.git", from: "6.1.1") + .package(url: "https://github.com/Lightstreamer/Lightstreamer-lib-client-swift.git", from: "6.2.0") ] ``` @@ -72,7 +72,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/6.1.1/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/6.2.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 @@ -80,7 +80,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/6.1.1/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/6.2.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 @@ -92,7 +92,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/6.1.1/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/6.2.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 { @@ -113,7 +113,7 @@ 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.4.0/General%20Concepts.pdf)). -After you have an APNs account, you can create a [MPN device](https://lightstreamer.com/api/ls-swift-client/6.1.1/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/6.2.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. @@ -136,7 +136,7 @@ func application(_ application: UIApplication, } ``` -To receive notifications, you need to subscribe to a [MPN subscription](https://lightstreamer.com/api/ls-swift-client/6.1.1/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/6.2.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() @@ -156,13 +156,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.4.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/distros/ls-server/7.4.5/docs/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.4.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/distros/ls-server/7.4.5/docs/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/6.1.1/Protocols/LSLoggerProvider.html) and set it as the default provider of [LightstreamerClient](https://lightstreamer.com/api/ls-swift-client/6.1.1/Classes/LightstreamerClient.html). +To enable the internal client logger, create an instance of [LoggerProvider](https://lightstreamer.com/api/ls-swift-client/6.2.0/Protocols/LSLoggerProvider.html) and set it as the default provider of [LightstreamerClient](https://lightstreamer.com/api/ls-swift-client/6.2.0/Classes/LightstreamerClient.html). ```swift let loggerProvider = ConsoleLoggerProvider(level: .debug) @@ -176,9 +176,9 @@ Compatible with Lightstreamer Server since version 7.4.0. - [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/6.1.1/index.html) +- [API Reference](https://lightstreamer.com/api/ls-swift-client/6.2.0/index.html) -- [Lightstreamer General Concepts](https://lightstreamer.com/docs/ls-server/7.4.0/General%20Concepts.pdf) +- [Lightstreamer General Concepts](https://lightstreamer.com/distros/ls-server/7.4.5/docs/General%20Concepts.pdf) ## Support