Changelog

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.

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.

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.

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.

Add

  • Limit the maximum number of frames of GIF images to avoid crashes caused by loading too many frames of GIFs, and provide a series of blocks to support custom implementation of GIF image playback.
  • Modify the UI effect of text input in the image editor.
  • Support set the default camera position.

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

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

fix different iOS version get keyWindow issue.

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

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