Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decide correct behaviour when ably-cocoa emits a state change without an error when there should be one #74

Open
lawrence-forooghian opened this issue Oct 1, 2024 · 0 comments
Labels
code-quality Affects the developer experience when working in our codebase. room-lifecycle Related to room lifecycle (temporary label).

Comments

@lawrence-forooghian
Copy link
Collaborator

lawrence-forooghian commented Oct 1, 2024

My understanding is that an ARTChannelStateChange emitted by an ably-cocoa channel will have a non-nil reason if one of the following is true (this at least seems to be the assumption made by the chat spec):

  • it is an UPDATE with resumed == false
  • it is an ATTACHED with resumed == false
  • it is a FAILED
  • it is a SUSPENDED

However, ably-cocoa’s Objective-C API is incapable of encoding this information, meaning that currently we instead have to trap at runtime (i.e. preconditionFailure) if the above expectation is violated. Decide what's the right thing to do here.

This is a similar issue to #12 (which describes a similar issue that users of the Chat SDK will encounter).

┆Issue is synchronized with this Jira Task by Unito

@lawrence-forooghian lawrence-forooghian added the code-quality Affects the developer experience when working in our codebase. label Oct 1, 2024
@lawrence-forooghian lawrence-forooghian added the room-lifecycle Related to room lifecycle (temporary label). label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality Affects the developer experience when working in our codebase. room-lifecycle Related to room lifecycle (temporary label).
Projects
None yet
Development

No branches or pull requests

1 participant