If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

This is probably your metadata adapter refusing the authentication and returning an unspecified error. Remember that CreditsException accepts only negative numbers as error codes, positive numbers are truncated to 0 (they are reserver for use by Lightstreamer).

If you don't have a logging system for you metadata adapter, you may set the logger LightstreamerLogger.connections.http at DEBUG level to have some clues. But beware: it's quite verbose, avoid doing it on a production server under load.

What is weird, is that the same works when doing the same with Javascript SDK.
In JS, I simply do not pass the username and the password, but in iOS I pass them as nil, because there is only one initializer to LSConnectionInfo.

If it were something wrong with the Server configuration, I would get some error with JS as well, isn't it?

If you can't discern the problem by taking a look at the log by yourself, proceed as follows:

- keep LightstreamerLogger.connections.http at DEBUG level;
- grab a server-side log while connecting with the JavaScript client (with user and password null);
- grab a server-side log while connecting with the iOS client (again with user and password nil, use the updated version 1.2.7);
- send us the two logs at support@lightstreamer.com.

We will examine the log and try to sort out this weird behavior for you.
Best regards,

I'm developing server side for Anatoly's iOS client, and our Metadata adapter is receiving empty string for user parameter when iOS sends nil (it receives char $, which is supposed to be encoding for empty string). On the other hand, javascript client correctly sends null (char #) when user is not set on connectionDetails.

you may be right, it seems there's a misalignment between Javascript and iOS clients, where the Javascript client omits the user for a null parameter, while the iOS client sends an empty user for a nil parameter. Thanks for reporting it.

We will fix this bug in an upcoming version. As suggested above, consider upgrading to Server 6.x, as this fix may not be released for older client libraries.