Realm Cocoa Versions Save

Realm is a mobile database: a replacement for Core Data & SQLite

v10.45.1

4 months ago

Fixed

  • Exceptions thrown while applying the initial download for a sync subscription change terminated the program rather than being reported to the sync error handler (Core #7196 and Core #7197).
  • Calling SyncSession.reconnect() while a reconnect after a non-fatal error was pending would result in an assertion failure mentioning "!m_try_again_activation_timer" if another non-fatal error was received (Core #6961).

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 15.1.0.
  • CocoaPods: 1.10 or later.
  • Xcode: 14.1-15.1.0.

Internal

  • Upgraded realm-core from 13.24.1 to 13.25.0

v10.45.0

4 months ago

Enhancements

  • Update release packaging for Xcode 15.1.
  • Expose waiting for upload/download on SyncSession, which will suspend the current method (or call an asynchronous block) until an upload or download completes for a given sync session, e.g.,:
    try realm.write {
      realm.add(Person())
    }
    try await realm.syncSession?.wait(for: .upload)
    
    Note that this should not generally be used– sync is eventually consistent and should be used as such. However, there are special cases (notably in testing) where this may be used.
  • Sync subscription change notifications are now cancelled if the sync session becomes inactive as is done for upload and download progress handlers. If a fatal sync error occurs it will be reported to the completion handler, and if the user is logged out an "operation cancelled" error will be reported. Non-fatal errors are unchanged (i.e. the sync client internally retries without reporting errors). Previously fatal errors would result in the completion handler never being called. (Core #7073)
  • Automatic client reset recovery now preserves the original division of changesets, rather than combining all unsynchronized changes into a single changeset. This will typically improve server-side performance when there are a large number of recovered changes (Core #7161).
  • Automatic client reset recovery now does a better job of recovering changes when changesets were downloaded from the server after the unuploaded local changes were committed. If the local Realm happened to be fully up to date with the server prior to the client reset, automatic recovery should now always produce exactly the same state as if no client reset was involved (Core #7161).

Fixed

  • Flexible sync subscriptions would sometimes not be sent to the server if they were created while the client was downloading the bootstrap state for a previous subscription change and the bootstrap did not complete successfully. (Core #7077, since v10.21.1)
  • Flexible sync subscriptions would sometimes not be sent to the server if an UPLOAD message was sent immediately after the subscription was created. (Core #7076, since v10.43.1)
  • Creating or removing flexible sync subscriptions while a client reset with automatic recovery enabled was being processed in the background would occasionally crash with a KeyNotFound exception. (Core #7090, since v10.28.2)
  • Automatic client reset recovery would sometimes fail with the error "Invalid schema change (UPLOAD): cannot process AddColumn instruction for non-existent table" when recovering schema changes while made offline. This would only occur if the server is using the recently introduced option to allow breaking schema changes in developer mode. (Core #7042).
  • MutableSet<String>.formIntersection() would sometimes cause a use-after-free if asked to intersect a set with itself (since v10.0.0).
  • Errors encountered while reapplying local changes for client reset recovery on partition-based sync Realms would result in the client reset attempt not being recorded, possibly resulting in an endless loop of attempting and failing to automatically recover the client reset. Flexible sync and errors from the server after completing the local recovery were handled correctly (Core #7149, since v10.0.0).
  • During a client reset with recovery when recovering a move or set operation on a List<Object> or List<AnyRealmValue> that operated on indices that were not also added in the recovery, links to an object which had been deleted by another client while offline would be recreated by the recovering client, but the objects of these links would only have the primary key populated and all other fields would be default values. Now, instead of creating these zombie objects, the lists being recovered skip such deleted links. (Core #7112, since client reset recovery was implemented in v10.25.0).
  • During a client reset recovery a Set of links could be missing items, or an exception could be thrown that prevents recovery (e.g. "Requested index 1 calling get() on set 'source.collection' when max is 0") (Core #7112, since client reset recovery was implemented in v10.25.0).
  • Calling sort() or distinct() on a MutableSet<Object> that had unresolved links in it (i.e. objects which had been deleted by a different sync client) would produce a Results with duplicate entries.
  • Automatic client reset recovery would duplicate insertions in a list when recovering a write which made an unrecoverable change to a list (i.e. modifying or deleting a pre-existing entry), followed by a subscription change, followed by a write which added an entry to the list (Core #7155, since the introduction of automatic client reset recovery for flexible sync).
  • Fixed several causes of "decryption failed" exceptions that could happen when opening multiple encrypted Realm files in the same process while using Realms stored on an exFAT file system. (Core #7156, since v1.0.0)
  • Fixed deadlock which occurred when accessing the current user from the App from within a callback from the User listener (Core #7183, since v10.42.0)
  • Having a class name of length 57 would make client reset crash as a limit of 56 was wrongly enforced (57 is the correct limit) (Core #7176, since v10.0.0)
  • Automatic client reset recovery on flexible sync Realms would apply recovered changes in multiple write transactions, releasing the write lock in between. This had several observable negative effects:
    • Other threads reading from the Realm while a client reset was in progress could observe invalid mid-reset state.
    • Other threads could potentially write in the middle of a client reset, resulting in history diverging from the server.
    • The change notifications produced by client resets were not minimal and would report that some things changed which actually didn't.
    • All pending subscriptions were marked as Superseded and then recreating, resulting in anything waiting for subscriptions to complete firing early. (Core #7161, since v10.29.0).
  • If the very first open of a flexible sync Realm triggered a client reset, the configuration had an initial subscriptions callback, both before and after reset callbacks, and the initial subscription callback began a read transaction without ending it (which is normally going to be the case), opening the frozen Realm for the after reset callback would trigger a BadVersion exception (Core #7161, since v10.29.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 15.1.0.
  • CocoaPods: 1.10 or later.
  • Xcode: 14.1-15.1.0.

Internal

  • Migrated our current CI Pipelines to Xcode Cloud.
  • Upgraded realm-core from 13.23.1 to 13.24.1

v10.44.0

6 months ago

Enhancements

  • Expose SyncSession.reconnect(), which requests an immediate reconnection if the session is currently disconnected rather than waiting for the normal reconnect delay.
  • Update release packaging for Xcode 15.1 beta. visionOS slices are now only included for 15.1 rather than splicing them into the non-beta 15.0 release.

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 15.0.0.
  • CocoaPods: 1.10 or later.
  • Xcode: 14.1-15.0.0.

v10.43.1

6 months ago

Enhancements

  • Empty commits no longer trigger an extra invocation of the sync progress handler reporting the exact same information as the previous invocation (Core #7031).

Fixed

  • Updating subscriptions did not trigger Realm autorefreshes, sometimes resulting in Realm.asyncRefresh() hanging until another write was performed by something else (Core #7031).

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 15.0.0.
  • CocoaPods: 1.10 or later.
  • Xcode: 14.1-15.0.0.

Internal

  • Upgraded realm-core from 13.22.0 to 13.23.1

v10.43.0

7 months ago

Enhancements

  • Added Results.subscribe API for flexible sync. Now you can subscribe and unsubscribe to a flexible sync subscription through an object Result.

    // Named subscription query
    let results = try await realm.objects(Dog.self).where { $0.age > 18 }.subscribe(name: "adults")
    results.unsubscribe()
    
    // Unnamed subscription query
    let results = try await realm.objects(Dog.self).subscribe()
    results.unsubscribe()
    

    After committing the subscription to the realm's local subscription set, the method will wait for downloads according to the WaitForSyncMode.

    let results = try await realm.objects(Dog.self).where { $0.age > 1 }.subscribe(waitForSync: .always)
    

    Where .always will always download the latest data for the subscription, .onCreation will do it only the first time the subscription is created, and .never will never wait for the data to be downloaded.

    This API is currently in preview and may be subject to changes in the future.

  • Added a new API which allows to remove all the unnamed subscriptions from the subscription set.

    realm.subscriptions.removeAll(unnamedOnly: true)
    

Fixed

  • Build the prebuilt libraries with the classic linker to work around the new linker being broken on iOS <15. When using CocoaPods or SPM, you will need to manually add -Wl,-classic_ld to OTHER_LDFLAGS for your application until Apple fixes the bug.
  • Remove the visionOS slice from the Carthage build as it makes Carthage reject the xcframework (#8370).
  • Permission errors when creating asymmetric objects were not handled correctly, leading to a crash (Core #6978, since 10.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 15.0.0.
  • CocoaPods: 1.10 or later.
  • Xcode: 14.1-15.0.0.

Internal

  • Upgraded realm-core from 13.21.0 to 13.22.0

v10.42.4

7 months ago

Enhancements

  • Asymmetric objects are now allowed to link to non-embedded, non-asymmetric objects. (Core #6981)

Fixed

  • The Swift package failed to link some required system libraries when building for Catalyst, potentially resulting in linker errors if the application did not pull them in (since v10.40.1)
  • Logging into a single user using multiple auth providers created a separate SyncUser per auth provider. This mostly worked, but had some quirks:
    • Sync sessions would not necessarily be associated with the specific SyncUser used to create them. As a result, querying a user for its sessions could give incorrect results, and logging one user out could close the wrong sessions.
    • Removing one of the SyncUsers would delete all local Realm files for all SyncUsers for that user.
    • Deleting the server-side user via one of the SyncUsers left the other SyncUsers in an invalid state.
    • A SyncUser which was originally created via anonymous login and then linked to an identity would still be treated as an anonymous users and removed entirely on logout. (Core #6837, since v10.0.0)
  • Reading existing logged-in users on app startup from the sync metadata Realm performed three no-op writes per user on the metadata Realm (Core #6837, since v10.0.0).
  • If a user was logged out while an access token refresh was in progress, the refresh completing would mark the user as logged in again and the user would be in an inconsistent state (Core #6837, since v10.0.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 15.0.0.
  • CocoaPods: 1.10 or later.
  • Xcode: 14.1-15.0.0.

Internal

  • Upgraded realm-core from 13.20.1 to 13.21.0
  • The schema version of the metadata Realm used to cache logged in users has been bumped. Upgrading is handled automatically, but downgrading from this version to older versions will result in cached logins being discarded.

v10.42.3

7 months ago

Enhancements

  • Update packaging for the Xcode 15.0 release. Carthage release and obj-c binaries are now built with Xcode 15.

Fixed

  • The prebuilt Realm.xcframework for SPM was packaged incorrectly and did not work (#8361, since v10.42.1).

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 15.0.0.
  • CocoaPods: 1.10 or later.
  • Xcode: 14.1-15.0.0.

v10.42.2

7 months ago

Enhancements

  • Add support for logging messages sent by the server. (Core #6476)
  • Unknown protocol errors received from the baas server will no longer cause the application to crash if a valid error action is also received. Unknown error actions will be treated as an ApplicationBug error action and will cause sync to fail with an error via the sync error handler. (Core #6885)
  • Some sync error messages now contain more information about what went wrong.

Fixed

  • The MultipleSyncAgents exception from opening a synchronized Realm in multiple processes at once no longer leaves the sync client in an invalid state. (Core #6868, since v10.36.0)
  • Testing the size of a collection of links against zero would sometimes fail (sometimes = "difficult to explain"). In particular: (Core #6850, since v10.41.0)
  • When async writes triggered a file compaction some internal state could be corrupted, leading to later crashes in the slab allocator. This typically resulted in the "ref + size <= next->first" assertion failure, but other failures were possible. Many issues reported; see Core #6340. (since 10.35.0)
  • Realm.Configuration.maximumNumberOfActiveVersions now handles intermediate versions which have been cleaned up correctly and checks the number of live versions rather than the number of versions between the oldest live version and current version (since 10.35.0).
  • If the client disconnected between uploading a change to flexible sync subscriptions and receiving the new object data from the server resulting from that subscription change, the next connection to the server would sometimes result in a client reset (Core #6966, since v10.21.1).

Deprecations

  • RLMApp has localAppName and localAppVersion fields which never ended up being used for anything and are now deprecated.
  • RLMSyncAuthError has not been used since v10.0.0 and is now deprecated.

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.1.
  • CocoaPods: 1.10 or later.
  • Xcode: 14.1-15 beta 7.

Internal

  • Upgraded realm-core from 13.17.1 to 13.20.1

v10.42.1

8 months ago

Fixed

  • The names of the prebuilt zips for SPM have changed to avoid having Carthage download them instead of the intended Carthage zip (#8326, since v10.42.0).
  • The prebuild Realm.xcframework for SwiftPM now has all platforms other than visionOS built with Xcode 14 to comply with app store rules (#8339, since 10.42.0).
  • Fix visionOS compilation with Xcode beta 7.

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.1.
  • CocoaPods: 1.10 or later.
  • Xcode: 14.1-15 beta 7.

v10.42.0

9 months ago

Enhancements

  • Add support for building for visionOS and add Xcode 15 binaries to the release package. visionOS currently requires installing Realm via either Swift Package Manager or by using a XCFramework as CocoaPods and Carthage do not yet support it.
  • Zips compatible with SPM's .binaryTarget() are now published as part of the releases on Github.
  • Prebuilt XCFrameworks are now built with LTO enabled. This has insignificant performance benefits, but cuts the size of the library by ~15%.

Fixed

  • Fix nested properties observation on a Projections not notifying when there is a property change. (#8276, since v10.34.0).
  • Fix undefined symbol error for UIKit when linking Realm to a framework using SPM. (#8308, since v10.41.0)
  • If the app crashed at exactly the wrong time while opening a freshly compacted Realm the file could be left in an invalid state (Core #6807, since v10.33.0).
  • Sync progress for DOWNLOAD messages was sometimes stored incorrectly, resulting in an extra round trip to the server. (Core #6827, since v10.31.0)

Breaking Changes

  • Legacy non-xcframework Carthage installations are no longer supported. Please ensure you are using --use-xcframeworks if installing via Carthage.

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.1.
  • CocoaPods: 1.10 or later.
  • Xcode: 14.1-15 beta 5.

Internal

  • Upgraded realm-core from 13.17.0 to 13.17.1
  • Release packages were being uploaded to several static.realm.io URLs which are no longer linked to anywhere. These are no longer being updated, and release packages are now only being uploaded to Github.