Skip to content

Improve the experience of subscribing from within a listener #97

@lawrence-forooghian

Description

@lawrence-forooghian

Currently you have to capture the return value of subscribe from within the listener, which Swift doesn't allow, forcing you to store it in a separate optional variable and then unwrap inside the callback. This is not great API. We should consider switching to something like the approach used by WIP ably-swift (a user-created signal that's passed in to the subscribe call; the signal then has an unsubscribe method).

┆Issue is synchronized with this Jira Task by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingBackwards incompatible changes made to the public API.enhancementNew feature or improved functionality.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions