ably / ably-asset-tracking-swift

iOS client SDKs for the Ably Asset Tracking service.
Apache License 2.0
9 stars 6 forks source link

The publisher should close the Ably connection when it has no trackables #528

Closed JakubJankowski closed 1 year ago

JakubJankowski commented 1 year ago

By default we start the connection with ably, even If there are no trackables in a Publisher, since the ARTClientOptions.autoConnect in Ably Cocoa defaults to true.

We should change this behaviour:

Here's a related Android issue, with some more info/discussions/considerations.

sync-by-unito[bot] commented 1 year ago

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3314

AndyTWF commented 1 year ago

Added this to the 1.0.0 milestone - as this is behaviour that happens in Android

lawrence-forooghian commented 1 year ago

@AndyTWF I believe this will be covered by #563 (for starting the connection) and #557 and #559 (for stopping the connection) — no additional work required, right?

lawrence-forooghian commented 1 year ago

Actually, the other change is to not auto connect. Would that be something we'd want to add once the aforementioned workers (which are responsible for triggering connect and disconnect actions) are all implemented?

AndyTWF commented 1 year ago

@lawrence-forooghian Yeah the work in #563 would probably be the ideal time to implement the not-autoconnecting behaviour, I could add it as a requirement there? What do you think?

AndyTWF commented 1 year ago

Have moved no autoconnecting into https://github.com/ably/ably-asset-tracking-swift/issues/589 as part of the 1.0.0 milestone