Changelog History
Page 1
-
v10.32.3 Changes
November 10, 2022๐ Fixed
- ๐ Fix name lookup errors when importing Realm Swift built in library evolution mode ((#8014).
- ๐ The prebuilt watchOS library in the objective-c release package was missing an arm64 slice. The Swift release package was uneffected (PR #8016).
- ๐ Fix issue where
RLMUserAPIKey.key
/UserAPIKey.key
incorrectly returned the name of the API key instead of the key itself. (#8021, since v10.0.0)
Compatibility
- Realm Studio: 11.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 14.1.
- CocoaPods: 1.10 or later.
- Xcode: 13.1-14.1.
-
v10.32.2 Changes
November 01, 2022๐ Switch to building the Carthage release with Xcode 14.1.
๐ Fixed
- ๐ Fix linker errors when building a release build with Xcode 14.1 when installing via SPM (#7995).
Compatibility
- Realm Studio: 11.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 14.1.
- CocoaPods: 1.10 or later.
- Xcode: 13.1-14.1.
-
v10.32.1 Changes
October 25, 2022โจ Enhancements
- ๐ Improve performance of client reset with automatic recovery and converting top-level tables into embedded tables (Core #5897).
Realm.Error
is now a typealias forRLMError
rather than a manually-defined version of what the automatic bridging produces. This should have no effect on existing working code, but the manual definition was missing a few things supplied by the automatic bridging.- ๐ Some sync errors sent by the server include a link to the server-side logs
associated with that error. This link is now exposed in the
serverLogURL
property onSyncError
(orRLMServerLogURLKey
userInfo field when using NSError).
๐ Fixed
- ๐ Many sync and app errors were reported using undocumented internal error
codes and/or domains and could not be progammatically handled. Some notable
things which now have public error codes instead of unstable internal ones:
Realm.Error.subscriptionFailed
: The server rejected a flexible sync subscription.AppError.invalidPassword
: A login attempt failed due to a bad password.AppError.accountNameInUse
: A registration attempt failed due to the account name being in use.AppError.httpRequestFailed
: A HTTP request to Atlas App Services completed with an error HTTP code. The failing code is available in thehttpStatusCode
property.- Many other less common error codes have been added to
AppError
. - All sync errors other than
SyncError.clientResetError
reported incorrect error codes. (since v10.0.0).
UserAPIKey.objectId
was incorrectly bridged to Swift asRLMObjectId
toObjectId
. This may produce warnings about an unneccesary cast if you were previously casting it to the correct type (since v10.0.0).- ๐ Fixed an assertion failure when observing change notifications on a sectioned result, if the first modification was to a linked property that did not cause the state of the sections to change. (Core #5912, since the introduction of sectioned results in v10.29.0)
- ๐ Fix a use-after-free if the last external reference to an encrypted synchronized Realm was closed between when a client reset error was received and when the download of the new Realm began. (Core #5949, since 10.28.4).
- ๐ Fix an assertion failure during client reset with recovery when recovering a list operation on an embedded object that has a link column in the path prefix to the list from the top level object. (Core #5957, since introduction of automatic recovery in v10.32.0).
- Creating a write transaction which is rejected by the server due to it exceeding the maximum transaction size now results in a client reset error instead of synchronization breaking and becoming stuck forever (Core #5209, since v10).
- Opening an unencrypted file with an encryption key would sometimes report a misleading error message that indicated that the problem was something other than a decryption failure (Core #5915, since 0.89.0).
- ๐ Fix a rare deadlock which could occur when closing a synchronized Realm immediately after committing a write transaction when the sync worker thread has also just finished processing a changeset from the server (Core #5948).
Compatibility
- Realm Studio: 11.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 14.0.1.
- CocoaPods: 1.10 or later.
- Xcode: 13.1-14.1.
Internal
- โฌ๏ธ Upgraded realm-core from 12.9.0 to 12.11.0.
-
v10.32.0 Changes
October 10, 2022โจ Enhancements
- โ Add
.recoverUnsyncedChanges
(RLMClientResetModeRecoverUnsyncedChanges
) and.recoverOrDiscardUnsyncedChanges
(RLMClientResetModeRecoverOrDiscardUnsyncedChanges
) behaviors toClientResetMode
(RLMClientResetMode
).- The newly added recover modes function by downloading a realm which reflects the latest state of the server after a client reset. A recovery process is run locally in an attempt to integrate the server state with any local changes from before the client reset occurred. The changes are integrated with the following rules:
- Objects created locally that were not synced before client reset, will be integrated.
- If an object has been deleted on the server, but was modified on the client, the delete takes precedence and the update is discarded.
- If an object was deleted on the client, but not the server, then the client delete instruction is applied.
- In the case of conflicting updates to the same field, the client update is applied.
- The client reset process will fallback to
ClientResetMode.discardUnsyncedChanges
if the recovery process fails in.recoverOrDiscardUnsyncedChanges
. - The client reset process will fallback to
ClientResetMode.manual
if the recovery process fails in.recoverUnsyncedChanges
. - The two new swift recovery modes support client reset callbacks:
.recoverUnsyncedChanges(beforeReset: ((Realm) -> Void)? = nil, afterReset: ((Realm, Realm) -> Void)? = nil)
. - The two new Obj-C recovery modes support client reset callbacks in
notifyBeforeReset
andnotifyAfterReset
for both[RLMUser configurationWithPartitionValue]
and[RLMUser flexibleSyncConfigurationWithClientResetMode]
For more detail on client reset callbacks, seeClientResetMode
,RLMClientResetBeforeBlock
,RLMClientResetAfterBlock
, and the 10.25.0 changelog entry.
- โ Add two new additional interfaces to define a manual client reset handler:
- Add a manual callback handler to
ClientResetMode.manual
->ClientResetMode.manual(ErrorReportingBlock? = nil)
. - Add the
RLMSyncConfiguration.manualClientResetHandler
property (typeRLMSyncErrorReportingBlock
). - These error reporting blocks are invoked in the event of a
RLMSyncErrorClientResetError
. - See
ErrorReportingBlock
(RLMSyncErrorReportingBlock
), andClientResetInfo
for more detail. - Previously, manual client resets were handled only through the
SyncManager.ErrorHandler
. You have the option, but not the requirement, to define manual reset handler in these interfaces. Otherwise, theSyncManager.ErrorHandler
is still invoked during the manual client reset process. - These new interfaces are only invoked during a
RLMSyncErrorClientResetError
. All other sync errors are still handled in theSyncManager.ErrorHandler
. - See 'Breaking Changes' for information how these interfaces interact with an already existing
SyncManager.ErrorHandler
.
- Add a manual callback handler to
๐ฅ Breaking Changes
- 0๏ธโฃ The default
clientResetMode
(RLMClientResetMode
) is switched from.manual
(RLMClientResetModeManual
) to.recoverUnsyncedChanges
(RLMClientResetModeRecoverUnsyncedChanges
).- If you are currently using
.manual
and continue to do so, the only change you must explicitly make is designating manual mode in yourRealm.Configuration.SyncConfiguration
s, since they will now default to.recoverUnsyncedChanges
. - You may choose to define your manual client reset handler in the newly
introduced
manual(ErrorReportingBlock? = nil)
orRLMSyncConfiguration.manualClientResetHandler
, but this is not required. TheSyncManager.errorHandler
will still be invoked during a client reset if no callback is passed into these new interfaces.
- If you are currently using
๐ Deprecations
- ๐
ClientResetMode.discardLocal
is deprecated in favor ofClientResetMode.discardUnsyncedChanges
. The reasoning is that the name better reflects the effect of this reset mode. There is no actual difference in behavior.
Compatibility
- Realm Studio: 11.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 14.0.1.
- CocoaPods: 1.10 or later.
- Xcode: 13.1-14.1.
- โ Add
-
v10.31.0 Changes
October 05, 2022๐ The prebuilt binary for Carthage is now build with Xcode 14.0.1.
โจ Enhancements
- Cut the runtime of aggregate operations on large dictionaries in half (Core #5864).
- ๐ Improve performance of aggregate operations on collections of objects by 2x to 10x (Core #5864). Greatly improve the performance of sorting or distincting a Dictionary's keys or values. The most expensive operation is now performed O(log N) rather than O(N log N) times, and large Dictionaries can see upwards of 99% reduction in time to sort. (Core #5166)
- โ Add support for changing the deployment location for Atlas Apps. Previously this was assumed to be immutable (Core #5648).
- ๐ The sync client will now yield the write lock to other threads which are waiting to perform a write transaction even if it still has remaining work to do, rather than always applying all changesets received from the server even when other threads are trying to write. (Core #5844).
- ๐ The sync client no longer writes an unused temporary copy of the changesets received from the server to the Realm file (Core #5844).
๐ Fixed
- Setting a
List
property withResults
no longer throws an unrecognized selector exception (since 10.8.0-beta.2) RLMProgressNotificationToken
andProgressNotificationToken
now hold a strong reference to the sync session, keeping it alive until the token is deallocated or invalidated, as the other notification tokens do. (#7831, since v2.3.0).- Results permitted some nonsensical aggregate operations on column types which do not make sense to aggregate, giving garbage results rather than reporting an error (Core #5876, since v5.0.0).
- Upserting a document in a Mongo collection would crash if the document's id type was anything other than ObjectId (since v10.0.0).
- ๐ Fix a use-after-free when a sync session is closed and the app is destroyed at the same time (Core #5752, since v10.19.0).
๐ Deprecations
- โก๏ธ
RLMUpdateResult.objectId
has been deprecated in favor ofRLMUpdateResult.documentId
to support reporting document ids which are not object ids. ### ๐ฅ Breaking Changes - Private API
_realmColumnNames
has been renamed to a new public API calledpropertiesMapping()
. This change only affects the Swift API and doesn't have any effects in the obj-c API.
Compatibility
- Realm Studio: 11.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 14.0.1.
- CocoaPods: 1.10 or later.
- Xcode: 13.1-14.1.
Internal
- โฌ๏ธ Upgraded realm-core from 12.7.0 to 12.9.0
-
v10.30.0 Changes
September 20, 2022๐ Fixed
- Incoming links from
RealmAny
properties were not handled correctly when migrating an object type from top-level to embedded.RealmAny
properties currently cannot link to embedded objects. (Core #5796, since 10.8.0). - โ
Realm.refresh()
sometimes did not actually advance to the latest version. It attempted to be semi-non-blocking in a very confusing way which resulted in it sometimes advancing to a newer version that is not the latest version, and sometimes blocking until notifiers are ready so that it could advance to the latest version. This behavior was undocumented and didn't work correctly, so it now always blocks if needed to advance to the latest version. (#7625, since v0.98.0). - ๐ Fix the most common cause of thread priority inversions when performing writes on the main thread. If beginning the write transaction has to wait for the background notification calculations to complete, that wait is now done in a QoS-aware way. (#7902)
- ๐ Subscribing to link properties in a flexible sync Realm did not work due to a mismatch between what the client sent and what the server needed. (Core #5409)
- ๐ Attempting to use
AsymmetricObject
with partition-based sync now reports a sensible error much earlier in the process. Asymmetric sync requires using flexible sync. (Core #5691, since 10.29.0). - Case-insensitive but diacritic-sensitive queries would crash on 4-byte UTF-8 characters (Core #5825, since v2.2.0)
- Accented characters are now handled by case-insensitive but diacritic-sensitive queries. (Core #5825, since v2.2.0)
๐ฅ Breaking Changes
-[RLMASLoginDelegate authenticationDidCompleteWithError:]
has been renamed to-[RLMASLoginDelegate authenticationDidFailWithError:]
to comply with new app store requirements. This only effects the obj-c API. (#7945)
Compatibility
- Realm Studio: 11.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 13.4.1.
- CocoaPods: 1.10 or later.
- Xcode: 13.1 - 14.
Internal
- โฌ๏ธ Upgraded realm-core from 12.6.0 to 12.7.0
- Incoming links from
-
v10.29.0 Changes
September 09, 2022โจ Enhancements
- โ Add support for asymmetric sync. When a class inherits from
AsymmetricObject
, objects created are synced unidirectionally to the server and cannot be queried or read locally.
class PersonObject: AsymmetricObject { @Persisted(primaryKey: true) var _id: ObjectId @Persisted var name: String @Persisted var age: Int } try realm.write { // This will create the object on the server but not locally. realm.create(PersonObject.self, value: ["_id": ObjectId.generate(), "name": "Dylan", "age": 20]) }
- โ Add ability to section a collection which conforms to
RealmCollection
,RLMCollection
. Collections can be sectioned by a unique key retrieved from a keyPath or a callback and will return an instance ofSectionedResults
/RLMSectionedResults
. Each section in the collection will be an instance ofResultsSection
/RLMSection
which gives access to the elements corresponding to the section key.SectionedResults
/RLMSectionedResults
andResultsSection
/RLMSection
have the ability to be observed.swift class DemoObject: Object { @Persisted var title: String @Persisted var date: Date var firstLetter: String { return title.first.map(String.init(_:)) ?? "" } } var sectionedResults: SectionedResults<String, DemoObject> // ... sectionedResults = realm.objects(DemoObject.self) .sectioned(by: \.firstLetter, ascending: true)
โ Add
@ObservedSectionedResults
for SwiftUI support. This property wrapper type retrieves sectioned results from a Realm using a keyPath or callback to determine the section key.struct DemoView: View { @ObservedSectionedResults(DemoObject.self, sectionKeyPath: \.firstLetter) var demoObjects var body: some View { VStack { List { ForEach(demoObjects) { section in Section(header: Text(section.key)) { ForEach(section) { object in MyRowView(object: object) } } } } } } }
โ Add automatic handing for changing top-level objects to embedded objects in migrations. Any objects of the now-embedded type which have zero incoming links are deleted, and objects with multiple incoming links are duplicated. This happens after the migration callback function completes, so there is no functional change if you already have migration logic which correctly handles this. (Core #5737).
๐ Improve performance when a new Realm file connects to the server for the first time, especially when significant amounts of data has been written while offline. (Core #5772)
๐ Shift more of the work done on the sync worker thread out of the write transaction used to apply server changes, reducing how long it blocks other threads from writing. (Core #5772)
๐ Improve the performance of the sync changeset parser, which speeds up applying changesets from the server. (Core #5772)
๐ Fixed
- ๐ Fix all of the UBSan failures hit by our tests. It is unclear if any of these manifested as visible bugs. (Core #5665)
- Upload completion callbacks were sometimes called before the final step of
interally marking the upload as complete, which could result in calling
Realm.writeCopy()
from the completion callback failing due to there being unuploaded changes. (Core #4865). - ๐ป Writing to a Realm stored on an exFAT drive threw the exception "fcntl() with F_BARRIERFSYNC failed: Inappropriate ioctl for device" when a write transaction needed to expand the file. (Core #5789, since 10.27.0)
- ๐ Syncing a Decimal128 with big significand could result in a crash. (Core #5728)
Compatibility
- Realm Studio: 11.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 13.4.1.
- CocoaPods: 1.10 or later.
- Xcode: 13.1-14 RC.
Internal
- โฌ๏ธ Upgraded realm-core from 12.5.1 to 12.6.0
- โ Add support for asymmetric sync. When a class inherits from
-
v10.28.7 Changes
September 02, 2022โจ Enhancements
- โ Add prebuilt binaries for Xcode 14 to the release package.
๐ Fixed
- ๐ Fix archiving watchOS release builds with Xcode 14.
Compatibility
- Realm Studio: 11.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 13.4.1.
- CocoaPods: 1.10 or later.
- Xcode: 13.1-14 beta 6.
-
v10.28.6 Changes
August 19, 2022๐ Fixed
- ๐ Fixed an issue where having realm-swift as SPM sub-target dependency leads to missing symbols error during iOS archiving (Core #7645).
Compatibility
- Realm Studio: 11.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 13.4.1.
- CocoaPods: 1.10 or later.
- Xcode: 13.1-14 beta 5.
Internal
- โฌ๏ธ Upgraded realm-core from 12.5.0 to 12.5.1
-
v10.28.5 Changes
August 09, 2022โจ Enhancements
- ๐ Improve performance of accessing
SubscriptionSet
properties when no writes have been made to the Realm since the last access.
๐ Fixed
- ๐ A use-after-free could occur if a Realm with audit events enabled was destroyed while processing an upload completion for the events Realm on a different thread. (Core PR #5714)
- ๐ Opening a read-only synchronized Realm for the first time via asyncOpen did
not set the schema version, which could lead to
m_schema_version != ObjectStore::NotVersioned
assertion failures later on.
Compatibility
- Realm Studio: 11.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 13.4.1.
- CocoaPods: 1.10 or later.
- Xcode: 13.1-14 beta 4.
Internal
- โฌ๏ธ Upgraded realm-core from 12.4.0 to 12.5.0
- ๐ Improve performance of accessing