Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: Exception [iOS]

Hybrid View

  1. #1
    Would be nice to make a vote bw iOS programmers who are using this library, but I'm strongly sure that lib shouldn't throw exception.

    Dmitry.V.Sazanovich

  2. #2
    Quote Originally Posted by Dmitry Sazanovich View Post
    Would be nice to make a vote bw iOS programmers who are using this library, but I'm strongly sure that lib shouldn't throw exception.

    Dmitry.V.Sazanovich
    Agreed. I use iOS client version 1.4.3 build 163 but it is still throwing Exceptions even for NSError version methods, which sounds like a blasphemy to me.
    Exceptions should be caught at a lower level in the Lighstreamer code and converted to NSErrors.

    On another topic, I tried a quick integration test of the pod version, not to actually use it, just for future integration when it will be time to move to it.
    The thing is the pod is holding a static library, which makes it difficult/impossible to integrate in development pods:
    https://github.com/CocoaPods/CocoaPods/issues/3267
    https://github.com/CocoaPods/CocoaPods/issues/3346
    https://github.com/CocoaPods/CocoaPods/issues/3583
    https://github.com/CocoaPods/CocoaPods/issues/3985

  3. #3
    Administrator
    Join Date
    Feb 2012
    Location
    Bologna, Italy
    Posts
    102
    Hello Romano,

    in client libraries version 1.x, there are some exceptions that we still throw from NSError methods because they are due to programmer errors. E.g. unsubscribing a table twice. Apple itself resorts to exceptions in such situations, to make the developer aware of the problem quickly.

    Anyway, as stated before, since client library 2.0 the APIs have been redesigned and error handling is now fully asynchronous. No more exceptions or even NSErrors.

    Regarding difficulties with our pods, a dependency we rely upon is distributed exclusively as a static library. As far as we know, to distribute a framework linked to a static library requires distributing the static library too, so that would not make any improvement. If you have better information to share with us, regarding these issues, we will surely consider them and take any appropriate step to improve our product.

    Best regards,

    Gianluca

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    521
    Hi Dmitry,

    Thank you very much for the feedback provided in this thread.

    We will take one or two weeks to ponder on this and get back to you.

    Cheers,

    Alessandro

  5. #5
    Thanks! Looking forward

  6. #6
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    521
    Dmitry,

    As anticipated, we have been working on a plan to improve the lib based on the suggestions we received.

    The short-term solution is a new release of the iOS client API, which will be available very soon (hopefully before the holiday season) as part of Lightstreamer 6.0.

    For every method that may throw an exception, a corresponding non-exception-throwing version will be provided. This alternative method has the same semantic, parameters and return values, except for an additional NSError pointer reference that may be used (if not nil) to store a runtime error. For example:

    Code:
    @try {
        [client openConnectionWithInfo:connectionInfo delegate:self];
    } @catch (NSException *e) {
        // Exception handling
    }
    May be replaced by:

    Code:
    NSError *error= nil;
    [client openConnectionWithInfo:connectionInfo delegate:self error:&error];
    if (error) {
       // Error handling
    }
    Note that exceptions due to programming errors (such as out-of-bounds access to arrays, etc.) may still be thrown.

    The long-term solution was already part of the roadmap. A brand new API will be released on the future, base on the "unified client api" model, which has already been rolled out for JavaScript. The other languages will follow. The unified api is fully asynchronous and throws exceptions only in case of malformed parameters, etc.

    Hope that helps.

    Thanks,
    Alessandro

  7. #7
    Hello!

    Today I decided update library. But I started getting a lot of bind_session.txt - one per update. I didn't touch anything more except of library and "include" files. Strange update, isn't it?

    NB: even if I set next properties explicitly it doesn't solve problem
    connectionInfo.streamSenseEnabled = YES;
    connectionInfo.isPolling = NO;

    Also I noted that LSConnectionInfo->pollingSecs now started redefine LSExtendedTableInfo->requestedMaxFrequency (I think should be vice-versa).

    Also I found seems same problem at forum (but I updated only iOS Client).
    http://forums.lightstreamer.com/showthread.php?1011-Upgraded-to-LS-4-and-many-POST-bind_session-txt

    I looking forward to any response. Thanks


    ps: Do anybody except of me use last version of iOS library?
    Last edited by Dmitry Sazanovich; March 4th, 2015 at 08:49 PM.

  8. #8
    Administrator
    Join Date
    Feb 2012
    Location
    Bologna, Italy
    Posts
    102
    Hello,

    calls to bind_session.txt are probably due to polling mode. The library may switch to polling mode when the network conditions require it. For example, if it cannot establish a streaming connection within the interval set into LSConnectionInfo.streamingTimeoutSecs.

    If you believe this should not happen with your network and library settings, please enable the following log categories:

    [LSLog enableSourceType:LOG_SRC_CLIENT];
    [LSLog enableSourceType:LOG_SRC_SESSION];
    [LSLog enableSourceType:LOG_SRC_STATE_MACHINE];

    and send us the log at support@lightstreamer.com, together with the library version and build number, so we can investigate.
    Best regards,

    Gianluca

  9. #9
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    Let me clarify the point with LSConnectionInfo->pollingSecs.

    This parameter is usually 0.
    This means that, in case of polling, a pure long polling is performed.
    In this case, Lightstreamer does its best effort to send to the client all available updates;
    as a consequence, any frequency limit settings, like LSExtendedTableInfo->requestedMaxFrequency, will be the only limits that will apply.

    On the other hand, if you set it as nonzero, it forces a client-side pause between subsequent polls, which brings you in a synchronous polling scenario.
    In this case, if the frequency of polls is lower than the LSExtendedTableInfo->requestedMaxFrequency setting of some item, it takes the precedence and lowers the update frequency seen by the application.

    Note that this behavior has not changed.

  10. #10
    Sent with Subject: Problems with iOS Client API version 1.4.1 build 157

 

 

Similar Threads

  1. Connection timed out on empty credentials on iOS [iOS]
    By Anatoly Gurfinkel in forum Client SDKs
    Replies: 9
    Last Post: July 6th, 2015, 04:24 PM
  2. iOS client API encoding issue
    By LS_Developer in forum Client SDKs
    Replies: 3
    Last Post: February 14th, 2013, 02:47 PM
  3. LS iOS LSCommand mode sample
    By mibrahim.youxel in forum Client SDKs
    Replies: 4
    Last Post: December 3rd, 2012, 09:49 AM
  4. Bandwidth in iOS
    By bor306 in forum Client SDKs
    Replies: 7
    Last Post: July 11th, 2012, 02:28 PM
  5. iOS Client Library Preview
    By Alessandro in forum Client SDKs
    Replies: 0
    Last Post: March 28th, 2011, 03:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 10:51 PM.