Skip to content

Releases: realm/realm-swift

v10.38.3

28 Apr 18:10
Compare
Choose a tag to compare

Enhancements

  • Improve performance of cancelling a write transactions after making changes. If no KVO observers are used this is now constant time rather than taking time proportional to the number of changes to be rolled back. Cancelling a write transaction with KVO observers is 10-20% faster. (Core PR #6513).

Fixed

  • Performing a large number of queries without ever performing a write resulted in steadily increasing memory usage, some of which was never fully freed due to an unbounded cache (#7978, since v10.27.0).

Compatibility

  • Realm Studio: 14.0.1 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.3.
  • CocoaPods: 1.10 or later.
  • Xcode: 13.4-14.3.

Internal

  • Upgraded realm-core from 13.9.3 to 13.9.4

v10.38.2

26 Apr 05:30
933294d
Compare
Choose a tag to compare

Enhancements

  • Improve performance of equality queries on a non-indexed AnyRealmValue
    property by about 30%. (Core #6506)

Fixed

  • SSL handshake errors were treated as fatal errors rather than errors which
    should be retried. (Core #6434, since v10.35.0)

Compatibility

  • Realm Studio: 14.0.1 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.3.
  • CocoaPods: 1.10 or later.
  • Xcode: 13.4-14.3.

Internal

  • Upgraded realm-core from 13.9.0 to 13.9.3.

v10.38.1

25 Apr 20:33
Compare
Choose a tag to compare

Fixed

  • The error handler set on EventsConfiguration was not actually used (since v10.26.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.3.
  • CocoaPods: 1.10 or later.
  • Xcode: 13.4-14.3.

v10.38.0

01 Apr 03:51
Compare
Choose a tag to compare

Switch to building the Carthage release with Xcode 14.3.

Enhancements

  • Add Xcode 14.3 binaries to the release package. Note that CocoaPods 1.12.0 does not support Xcode 14.3.
  • Add support for sharing encrypted Realms between multiple processes. (Core #1845)

Fixed

  • Fix a memory leak reported by Instruments on URL.path in Realm.Configuration.fileURL when using a string partition key in Partition Based Sync (#8195), since v10.0.0).
  • Fix a data race in version management. If one thread committed a write transaction which increased the number of live versions above the previous highest seen during the current session at the same time as another thread began a read, the reading thread could read from a no-longer-valid memory mapping. This could potentially result in strange crashes when opening, refreshing, freezing or thawing a Realm (Core #6411, since v10.35.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.3.
  • CocoaPods: 1.10 or later.
  • Xcode: 13.4-14.3.

Internal

  • Upgraded realm-core from 13.8.0 to 13.9.0.

v10.37.2

30 Mar 00:18
Compare
Choose a tag to compare

Fixed

  • Copying a RLMRealmConfiguration failed to copy several fields. This resulted in migrations being passed the incorrect object type in Swift when using the default configuration (since v10.34.0) or async open (since v10.37.0). This also broke using the Events API in those two scenarios (since v10.26.0 for default configuration and v10.37.0 for async open). (#8190)

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.

v10.37.1

28 Mar 00:44
Compare
Choose a tag to compare

Enhancements

  • Performance improvement for the following queries (Core #6376):
    • Significant (~75%) improvement when counting (Results.count) the number of exact matches (with no other query conditions) on a string/int/UUID/ObjectID property that has an index. This improvement will be especially noticeable if there are a large number of results returned (duplicate values).
    • Significant (~99%) improvement when querying for an exact match on a Date property that has an index.
    • Significant (~99%) improvement when querying for a case insensitive match on an AnyRealmValue property that has an index.
    • Moderate (~25%) improvement when querying for an exact match on a Bool property that has an index.
    • Small (~5%) improvement when querying for a case insensitive match on an AnyRealmValue property that does not have an index.

Fixed

  • Add missing @Sendable annotations to several sync and app services related callbacks (PR #8169, since v10.34.0).
  • Fix some bugs in handling task cancellation for async Realm init. Some very specific timing windows could cause crashes, and the download would not be cancelled if the Realm was already open (PR #8178, since v10.37.0).
  • Fix a crash when querying an AnyRealmValue property with a string operator (contains/like/beginswith/endswith) or with case insensitivity. (Core #6376, since v10.8.0)
  • Querying for case-sensitive equality of a string on an indexed AnyRealmValue property was returning case insensitive matches. For example querying for myIndexedAny == "Foo" would incorrectly match on values of "foo" or "FOO" etc. (Core #6376, since v10.8.0)
  • Adding an index to an AnyRealmValue property when objects of that type already existed would crash with an assertion. (Core #6376, since v10.8.0).
  • Fix a bug that may have resulted in arrays being in different orders on different devices. Some cases of “Invalid prior_size” may be fixed too. (Core #6191, since v10.25.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.6.0 to 13.8.0

v10.37.0

10 Mar 03:23
Compare
Choose a tag to compare

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

v10.36.0

15 Feb 23:58
4d55ba8
Compare
Choose a tag to compare

Enhancements

  • Add support for multiple overlapping or nested event scopes. Events.beginScope() now returns a Scope object which is used to commit or cancel that scope, and if more than one scope is active at a time events are reported to all active scopes.

Fixed

  • Fix moving List items to a higher index in SwiftUI results in wrong destination index (#7956, since v10.6.0).
  • Using the searchable view modifier with @ObservedResults in iOS 16 would cause the collection observation subscription to cancel. (#8096, since 10.21.0)
  • Client reset with recovery would sometimes crash if the recovery resurrected a dangling link (Core #6292, since v10.32.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.0 to 13.4.1

v10.35.1

10 Feb 23:29
Compare
Choose a tag to compare

Fixed

  • Client reset with recovery would crash if a client reset occurred the very first time the Realm was opened with async open. The client reset callbacks are now not called if the Realm had never been opened before (PR #8125, since 10.32.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.

v10.35.0

07 Feb 20:29
2ad4316
Compare
Choose a tag to compare

This version bumps the Realm file format version to 23. Realm files written by this version cannot be read by older versions of Realm.

Enhancements

  • The Realm file is now automatically shrunk if the file size is larger than needed to store all of the data. (Core PR #5755)
  • Pinning old versions (either with frozen Realms or with Realms on background threads that simply don't get refreshed) now only prevents overwriting the data needed by that version, rather than the data needed by that version and all later versions. In addition, frozen Realms no longer pin the transaction logs used to drive change notifications. This mostly eliminates the file size growth caused by pinning versions. (Core PR #5440)
  • Rework how Dictionaries/Maps are stored in the Realm file. The new design uses less space and is typically significantly faster. This changes the iteration order of Maps, so any code relying on that may be broken. We continue to make no guarantees about iteration order on Maps (Core #5764).
  • Improve performance of freezing Realms (Core PR #6211).

Fixed

  • Fix a crash when using client reset with recovery and flexible sync with a single subscription (Core #6070, since v10.28.2)
  • Encrypted Realm files could not be opened on devices with a larger page size than the one which originally wrote the file. (#8030, since v10.32.1)
  • Creating multiple flexible sync subscriptions at once could hit an assertion failure if the server reported an error for any of them other than the last one (Core #6038, since v10.21.1).
  • Set<AnyRealmValue> and List<AnyRealmValue> considered a string and binary data containing that string encoded as UTF-8 to be equivalent. This could result in a List entry not changing type on assignment and for the client be inconsistent with the server if a string and some binary data with equivalent content was inserted from Atlas. (Core #4860 and Core #6201, since v10.8.0)
  • Querying for NaN on Decimal128 properties did not match any objects (Core #6182, since v10.8.0).
  • When client reset with recovery is used and the recovery did not need to make any changes to the local Realm, the sync client could incorrectly think the recovery failed and report the error "A fatal error occured during client reset: 'A previous 'Recovery' mode reset from did not succeed, giving up on 'Recovery' mode to prevent a cycle'". (Core #6195, since v10.32.0)
  • Writing to newly in-view objects while a flexible sync bootstrap was in progress would not synchronize those changes to the server (Core #5804, since v10.21.1).
  • If a client reset with recovery or discard local was interrupted while the "fresh" realm was being downloaded, the sync client could crash with a MultpleSyncAgents exception (Core #6217, since v10.25.0).
  • Sharing Realm files between a Catalyst app and Realm Studio did not properly synchronize access to the Realm file (Core #6258, since v10.0.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 12.13.0 to 13.4.0