Jump to content
  • 0

No connexion on swift lightstream SDK


julienchino

Question

I'm certainly missing something obvious but I can't figure it out.
I'm trying to get the lightstream sdk to work on a macOS project in swift

Everything compiles perfectly and runs without errors but the log systematically indicates Status: CONNECTING

The same code in Javascript works just fine.
LighstreamerClient is version 5.0.3 as recommended.

Here is my code

let loggerProvider = ConsoleLoggerProvider(level: .debug)
LightstreamerClient.setLoggerProvider(loggerProvider)

let client = LightstreamerClient(serverAddress: lightstreamerEndpoint)
client.connectionDetails.user = currentAccountId
client.connectionDetails.setPassword("CST-\(cst)|XST-\(securityToken)")
client.addDelegate(ClientDelegateImpl())
client.connect()

And the log :
serverAddress changed: https://apd.marketdatasystems.com
user changed: XXXXX
password changed
Connection requested: details: [serverAddress: https://apd.marketdatasystems.com, user: XXXXX, libVersion: swift_client 5.0.3] options: [requestedMaxBandwidth: unlimited, retryDelay: 4000, firstRetryMaxDelay: 100, sessionRecoveryTimeout: 15000, stalledTimeout: 2000, reconnectTimeout: 3000, idleTimeout: 19000, contentLength: 50000000]
Status: CONNECTING
WS connecting: https://apd.marketdatasystems.com/lightstreamer Sec-WebSocket-Protocol: TLCP-2.4.0.lightstreamer.com

Does anyone have an idea or managed to get the SDK to work with IG on swift?

Link to comment

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...
us