Results 1 to 2 of 2
  1. #1

    doubt to change LSSubscribedTableKey to LSSubscription

    Hello


    I'm trying to update my app to version 2.1, and I'm having trouble understanding part of the tablekey.
    I had this method:


    Code:
    - (void) table:(LSSubscribedTableKey *)tableKey itemPosition:(int)itemPosition itemName:(NSString *)itemName didUpdateWithInfo:(LSUpdateInfo *)updateInfo {
        
        @synchronized (dicionarioDeConexoes) {
            NSNumber *idConexao = [dicionarioDeTableKeys objectForKey:tableKey];
            if (idConexao) {
                DadosDasConexoes *dados = [dicionarioDeConexoes objectForKey:idConexao];
                if (dados && dados.receptor && [dados.receptor conformsToProtocol:@protocol(ProtocoloDeDadosDoServidor)]) {
                    [dados.receptor conexao:dados.idConexao posicao:itemPosition item:itemName updateInfo:updateInfo];
                }
            }
        }
    }

    I tried to do this:


    Code:
    - (void) subscription:(nonnull LSSubscription *)subscription didUpdateItem:(nonnull LSItemUpdate *)itemUpdate {
       
        @synchronized (dicionarioDeConexoes) {
            NSNumber *idConexao = [dicionarioDeTableKeys objectForKey:itemUpdate.itemPos];
            if (idConexao) {
                DadosDasConexoes *dados = [dicionarioDeConexoes objectForKey:idConexao];
                if (dados && dados.receptor && [dados.receptor conformsToProtocol:@protocol(ProtocoloDeDadosDoServidor)]) {
                    [dados.receptor conexao:dados.idConexao posicao:(int)itemUpdate.itemPos item:itemUpdate.itemName updateInfo:itemUpdate.observationInfo];
                }
            }
        }
        
    }


    But don't work, I had bad access.


    I'm tried get the table key using:
    Code:
    LSSubscription *tableKey;

    And this:


    Code:
    [self.dicionarioDeTableKeys setObject:window forKey:dados.tableKey];

    Where am I going wrong?

  2. #2
    Hello

    I managed to solve using this article:
    https://lightstreamer.com/api/ls-ios-client/latest/

 

 

Similar Threads

  1. doubt to change LSSubscribedTableKey to LSSubscription
    By alexandreccarmo in forum Client SDKs
    Replies: 2
    Last Post: May 1st, 2020, 06:04 PM
  2. Will session id change when connection mode change?
    By LS_Developer in forum Client SDKs
    Replies: 3
    Last Post: March 6th, 2012, 09:58 AM
  3. Replies: 8
    Last Post: March 25th, 2010, 10:02 AM
  4. status change when the content length is reached
    By riwang in forum Client SDKs
    Replies: 3
    Last Post: May 21st, 2009, 10:37 AM
  5. Replies: 4
    Last Post: March 19th, 2008, 11:10 AM

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 05:02 PM.