Skip to content

1.2.57

Choose a tag to compare

@lawrence-forooghian lawrence-forooghian released this 21 Jan 16:13
· 337 commits to main since this release
e62a771

What's Changed

This release introduces new overloads of publish() that return the serial of the published message(s). This simplifies the scenario in which a client wishes to perform an update to a message that it previously published.

These new overloads are differentiated from the existing ones by:

  • a different argument label for the callback (resultCallback instead of callback)
  • a different number of arguments for the callback (two instead of one)

If you have any existing calls to publish(), they should be unaffected by the introduction of these new overloads.

To call these new overloads in Swift, you can simply pass a trailing closure which accepts two arguments:

channel.publish("foo", data: nil) { publishResult, error in
  // publishResult.serials contains the serial of the published message
  // …
}

For more information, see the documentation on updating and deleting messages.

Full Changelog: ably/ably-cocoa@1.2.56...1.2.57