Skip to content

Commit

Permalink
prepare release v5.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
acarioni committed Jun 14, 2023
1 parent 8a9599e commit a9dc9b7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# SDK for Swift Clients CHANGELOG

## 5.0.3

_Compatible with Lightstreamer Server since 7.3.2._<br>
_Compatible with code developed for the previous versions._<br>
_Released on 14 Jun 2023._

Fixed the validation check of the setter `items` of the classes `Subscription` and `MPNSubscription` in order to accept item names that start with a digit but contain non-digit characters too.


## 5.0.2

_Compatible with Lightstreamer Server since 7.3.2._<br>
Expand Down
2 changes: 1 addition & 1 deletion LightstreamerClient.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NB keep in sync with Package.swift
Pod::Spec.new do |s|
s.name = 'LightstreamerClient'
s.version = '5.0.2'
s.version = '5.0.3'
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' }
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,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: "5.0.2")
.package(url: "https://github.com/Lightstreamer/Lightstreamer-lib-client-swift.git", from: "5.0.3")
]
```

Expand Down Expand Up @@ -71,15 +71,15 @@ 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.2/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.3/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
let client = LightstreamerClient(serverAddress: "https://push.lightstreamer.com/", adapterSet: "DEMO")
client.connect()
```

For each subscription to be subscribed to a Lightstreamer Server a [Subscription](https://lightstreamer.com/api/ls-swift-client/5.0.2/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.3/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
Expand All @@ -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.2/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.3/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 {
Expand All @@ -112,7 +112,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.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.2/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.3/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.

Expand All @@ -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.2/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.3/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()
Expand All @@ -161,7 +161,7 @@ The optional trigger expression lets you specify when to send the notificati

## Logging

To enable the internal client logger, create an instance of [LoggerProvider](https://lightstreamer.com/api/ls-swift-client/5.0.2/Protocols/LSLoggerProvider.html) and set it as the default provider of [LightstreamerClient](https://lightstreamer.com/api/ls-swift-client/5.0.2/Classes/LightstreamerClient.html).
To enable the internal client logger, create an instance of [LoggerProvider](https://lightstreamer.com/api/ls-swift-client/5.0.3/Protocols/LSLoggerProvider.html) and set it as the default provider of [LightstreamerClient](https://lightstreamer.com/api/ls-swift-client/5.0.3/Classes/LightstreamerClient.html).

```swift
let loggerProvider = ConsoleLoggerProvider(level: .debug)
Expand All @@ -175,7 +175,7 @@ Compatible with Lightstreamer Server since version 7.3.2.

- [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.2/index.html)
- [API Reference](https://lightstreamer.com/api/ls-swift-client/5.0.3/index.html)

- [Lightstreamer General Concepts](https://lightstreamer.com/docs/ls-server/7.3.0/General%20Concepts.pdf)

Expand Down

0 comments on commit a9dc9b7

Please sign in to comment.