Login limit error

Hi, I’m using AppleTV for a dashboard information of the control access solution.

Something wrong in my code because each time login with the same credentials didn’t clear the prior connection.

Any ideas what could be wrong in my login process?

Thanks, Mario

Hi Mario,

You need to add logic after login to unsubscribe from items you no longer need. There’s a limit on concurrent subscriptions per connection, so it’s important to manage them properly.

Regards,
Stanislaw

1 Like

Hi Stanislaw,

Thanks for the quick answer. Can I use an Event handler at the Cloud Code to solve it? Can you help me with the codeless code?

Or I must write a code in swift to handle the unsubscribe? In that case can you send me any info how to do it?

Thanks, Mario

You need to write a Swift code to handle unsubscribe. We have no docs for swift now, but you could see how it works for JS here

And here is a source for swift methods

Hi Dima

removerListeners(tableName: “AppleTVs”);

func removerListeners(tableName: String) {
// Elimina todos los create listeners en esa tabla
Backendless.shared.data.ofTable(tableName).rt.removeCreateListeners()
print(“Todos los listeners de creación eliminados.”)
}

Thanks, Mario