github realm/realm-swift v10.37.0

latest releases: v20.0.0, v10.53.1, v10.53.0...
18 months ago

Enhancements

  • MongoCollection.watch().subscribe(on:) now supports any swift Scheduler rather than only dispatch queues (PR #8131).
  • Add an async sequence wrapper for MongoCollection.watch(), allowing you to do for try await change in collection.changeEvents { ... } (PR #8131).
  • The internals of error handling and reporting have been significantly reworked. The visible effects of this are that some errors which previously had unhelpful error messages now include more detail about what went wrong, and App errors now expose a much more complete set of error codes (PR #8002).
  • Expose compensating write error information. When the server rejects a modification made by the client (such as if the user does not have the required permissions), a SyncError is delivered to the sync error handler with the code .writeRejected and a non-nil compensatingWriteInfo field which contains information about what was rejected and why. This information is intended primarily for debugging and logging purposes and may not have a stable format. (PR #8002)
  • Async Realm.init() now handles Task cancellation and will cancel the async open if the Task is cancelled (PR #8148).
  • Cancelling async opens now has more consistent behavior. The previously intended and documented behavior was that cancelling an async open would result in the callback associated with the specific task that was cancelled never being called, and all other pending callbacks would be invoked with an ECANCELED error. This never actually worked correctly, and the callback which was not supposed to be invoked at all sometimes would be. We now unconditionally invoke all of the exactly once, passing ECANCELED to all of them (PR #8148).

Fixed

  • UserPublisher incorrectly bounced all notifications to the main thread instead of setting up the Combine publisher to correctly receive on the main thread. (#8132, since 10.21.0)
  • Fix warnings when building with Xcode 14.3 beta 2.
  • Errors in async open resulting from invalid queries in initialSubscriptions would result in the callback being invoked with both a non-nil Realm and a non-nil Error even though the Realm was in an invalid state. Now only the error is passed to the callback (PR #8148, since v10.28.0).
  • Converting a local realm to a synced realm would crash if an embedded object was null (Core #6294, since v10.22.0).
  • Subqueries on indexed properties performed extremely poorly. (Core #6327, since v5.0.0)
  • Fix a crash when a SSL read successfully read a non-zero number of bytes and also reported an error. (Core #5435, since 10.0.0)
  • The sync client could get stuck in an infinite loop if the server sent an invalid changeset which caused a transform error. This now results in a client reset instead. (Core #6051, since v10.0.0)
  • Strings in queries which contained any characters which required multiple bytes when encoded as utf-8 were incorrectly encoded as binary data when serializing the query to send it to the server for a flexible sync subscription, resulting the server rejecting the query (Core #6350, since 10.22.0).

Compatibility

  • Realm Studio: 13.0.2 or later.
  • APIs are backwards compatible with all previous releases in the 10.x.y series.
  • Carthage release for Swift is built with Xcode 14.2.
  • CocoaPods: 1.10 or later.
  • Xcode: 13.3-14.2.

Internal

  • Upgraded realm-core from 13.4.1 to 13.6.0

Don't miss a new realm-swift release

NewReleases is sending notifications on new releases.