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:
- (void) table :Smile_Ac: LSSubscribedTableKey *)tableKey itemPosition :Smile_Ac: int)itemPosition itemName :Smile_Ac: NSString *)itemName didUpdateWithInfo :Smile_Ac: 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:
- (void) subscription :Smile_Ac: nonnull LSSubscription *)subscription didUpdateItem :Smile_Ac: 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 :Smile_Ac: 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:
LSSubscription *tableKey;
And this:
[self.dicionarioDeTableKeys setObject:window forKey:dados.tableKey];
Where am I going wrong?