github realm/realm-swift v10.0.0-rc.2

latest releases: v10.50.0, v10.49.3, v10.48.2...
pre-release3 years ago

Enhancements

  • Add the ability to listen for when a Watch Change Stream is opened when using Combine. Use onOpen(event:) directly after opening a WatchPublisher to register a callback to be invoked once the change stream is opened.

Breaking Changes

  • The insert operations on Mongo collections now report the inserted documents' IDs as BSON rather than ObjectId.
  • Embedded objects can no longer form cycles at the schema level. For example, type A can no longer have an object property of type A, or an object property of type B if type B links to type A. This was always rejected by the server, but previously was allowed in non-synchronized Realms.
  • Primary key properties are once again marked as being indexed. This reflects an internal change to how primary keys are handled that should not have any other visible effects.
  • Change paired return types from Swift completion handlers to return Result<Value, Error>.
  • Adjust how RealmSwift.Object is defined to add support for Swift Library Evolution mode. This should normally not have any effect, but you may need to add override to initializers of object subclasses.
  • Add .null type to AnyBSON. This creates a distinction between null values and properly absent BSON types.

Fixed

  • Set the precision correctly when serializing doubles in extended json.
  • Reading the objectTypes array from a Realm Configuration would not include the embedded object types which were set in the array.
  • Although MongoClient is obtained from a User, it was actually using the User's App's current user rather than the User it was obtained from to make requests.

This release also contains the following changes from 5.4.7 - 5.5.0

Enhancements

  • Add the ability to capture a NotificationToken when using a Combine publisher that observes a Realm Object or Collection. The user will call saveToken(on:at:) directly after invoking the publisher to use the feature.

Fixed

  • When using Realm.write(withoutNotifying:) there was a chance that the supplied observation blocks would not be skipped when in a write transaction. (Object Store #1103)
  • Comparing two identical unmanaged List<>/RLMArray objects would fail. (#5665).
  • Case-insensitive equality queries on indexed string properties failed to clear some internal state when rerunning the query. This could manifest as duplicate results or "key not found" errors. (#6830, #6694, since 5.0.0).
  • Equality queries on indexed string properties would sometimes throw "key not found" exceptions if the hash of the string happened to have bit 62 set. (.NET #2025, since v5.0.0).
  • Queries comparing non-optional int properties to nil would behave as if they were comparing against zero instead (since v5.0.0).

Compatibility

  • File format: Generates Realms with format v12 (Reads and upgrades all previous formats)
  • Realm Studio: 10.0.0 or later.
  • APIs are backwards compatible with all previous releases in the 10.x.y series.
  • Carthage release for Swift is built with Xcode 12.

Internal

  • Upgraded realm-core from v10.0.0-beta.9 to v10.0.0
  • Upgraded realm-sync from v10.0.0-beta.14 to v10.0.0

Don't miss a new realm-swift release

NewReleases is sending notifications on new releases.