All Versions
83
Latest Version
Avg Release Cycle
22 days
Latest Release
220 days ago

Changelog History
Page 1

  • v10.18.0 Changes

    November 02, 2022

    โœจ Enhancements

    • Introduced Realm.SourceGenerator, a Source Generator that can generate Realm model classes. This is part of our ongoing effort to modernize the Realm library, and will allow to introduce certain language level features easier in the future. In order to use the source generation the model classes need to be declared implementing one of the base interfaces (IRealmObject, IEmbeddedObject or IAsymmetricObject) and be declared partial. For example:

      public partial class Person: IRealmObject
      {
        public int Age { get; set; }
      
        public string Name { get; set; }  
      
        public PhoneNumber Phone { get; set; }
      }
      

    public partial class PhoneNumber: IEmbeddedObject { public string Number { get; set; }

      public string Prefix { get; set; }  
    

    }

      The source generator will then take care of adding the full implementation for the interfaces. 
    
      Most of the time converting the "classic" Realm model classes (classes derived from `RealmObject`, `EmbeddedObject` or `AsymmetricObject`) to use the new source generation means just defining the class as partial and switching out the base class for the corresponding interface implementation.
      The classic Realm model definition will still be supported, but will be phased out in the future.
    
      Please note that the source generator is still in beta, so let us know if you experience any issue while using them. 
      Some additional notes:
      * `OnManaged` and `OnPropertyChanged` are now partial methods.
      * Inheritance is not supported, so the Realm models cannot derive from any other class.
      * Nested classes are not supported.
    
    ### ๐Ÿ›  Fixed
    * ๐Ÿ›  Fixed a NullReferenceException being thrown when subscribing to `PropertyChanged` notifications on a `Session` instance that is then garbage collected prior to unsubscribing. (PR [#3061](https://github.com/realm/realm-dotnet/pull/3061))
    * โœ‚ Removed bitcode support from the iOS binary as it's no longer accepted for App Store submissions. (Issue [#3059](https://github.com/realm/realm-dotnet/issues/3059))
    * ๐Ÿ›  Fixed returning the parent when accessing it on an `IEmbeddedObject`. (Issue [#2742](https://github.com/realm/realm-dotnet/issues/2742))
    * ๐ŸŽ Slightly increased performance and reduced allocations when creating an enumerator for frozen collections (Issue [#2815](https://github.com/realm/realm-dotnet/issues/2815)).
    
    ### Compatibility
    * Realm Studio: 11.0.0 or later.
    
    ### Internal
    * Using Core 12.9.0.
    * โž• Added workflow to automatically assign users to issues and PRs. (PR [#3069](https://github.com/realm/realm-dotnet/pull/3069))
    * โž• Added workflow to validate changelog has been updated. (PR [#3069](https://github.com/realm/realm-dotnet/pull/3069))
    
  • v10.17.0 Changes

    October 06, 2022

    โœจ Enhancements

    • โฌ†๏ธ Prioritize integration of local changes over remote changes - shorten the time users may have to wait when committing local changes. Stop storing downloaded changesets in history. (Core upgrade)
    • ๐ŸŽ 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 upgrade)
    • ๐Ÿš€ Seamlessly handle migrating an App Services application deployment model. (Core upgrade)

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fix a use-after-free when a sync session is closed and the app is destroyed at the same time. (Core upgrade)
    • ๐Ÿ›  Fixed a NullReferenceException occurring in RealmObjectBase's finalizer whenever an exception is thrown before the object gets initialized. (Issue #3045)

    Compatibility

    • Realm Studio: 11.0.0 or later.

    Internal

    • Using Core 12.9.0
  • v10.16.0 Changes

    October 03, 2022

    โœจ Enhancements

    • ๐ŸŽ Introduced AsymmetricObject intended for write-heavy workloads, where high performance is generally important. This new object:
      1. syncs data unidirectionaly, from the clients to the server
      2. can't be queried, deleted, or modified once added to the Realm
      3. is only usable with flexible sync
      4. can't be the receiveing end of any type of relationship
      5. can contain EmbeddedObjects but cannot link to RealmObject or AsymmetricObject.

    In the same write transaction, it is legal to add AsymmetricObjects and RealmObjects

      class Measurement : AsymmetricObject
      {
          [PrimaryKey, MapTo("_id")]
          public Guid Id { get; private set; } = Guid.NewGuid();
    
          public double Value { get; set; }
    
          public DataTimeOffset Timestamp { get; private set; } = DateTimeOffset.UtcNow;
      }
    
      class Person : RealmObject
      {
          //............
      }
    
      //.....
    
      var measurement = new Measurement
      {
        Value = 9.876
      };
    
      realm.Write(() =>
      {
          realm.Add(measurement);
    
          realm.Add(new Person());
      });
    
      _ = asymmetricObject.Value;   // runtime error
      _ = realm.All<Measurement>(); // compile time error
    
    • โž• Added two client reset handlers, RecoverUnsyncedChangesHandler and RecoverOrDiscardUnsyncedChangesHandler, that try to automatically merge the unsynced local changes with the remote ones in the event of a client reset. Specifically with RecoverOrDiscardUnsyncedChangesHandler, you can fallback to the discard local strategy in case the automatic merge can't be performed as per your server's rules. These new two stragegies simplify even more the handling of client reset events when compared to DiscardUnsyncedChangesHandler.RecoverOrDiscardUnsyncedChangesHandler is going to be the default from now on. An example is as follows
    • โž• Added two client reset handlers, RecoverUnsyncedChangesHandler and RecoverOrDiscardUnsyncedChangesHandler, that try to automatically merge the unsynced local changes with the remote ones in the event of a client reset. Specifically with RecoverOrDiscardUnsyncedChangesHandler, you can fallback to the discard unsynced strategy in case the automatic merge can't be performed as per your server's rules. These new two stragegies simplify even more the handling of client reset events when compared to DiscardUnsyncedChangesHandler.RecoverOrDiscardUnsyncedChangesHandler is going to be the default from now on. More info on the aforementioned strategies can be found in our docs page. An example usage of one of the new handler is as follows:

      var conf = new PartitionSyncConfiguration(partition, user)
      {
      ClientResetHandler = new RecoverOrDiscardUnsyncedChangesHandler
      {
        // As always, the following callbacks are optional
      
        OnBeforeReset = (beforeFrozen) =>
        {
          // executed right before a client reset is about to happen
        },
        OnAfterRecovery = (beforeFrozen, after) =>
        {
          // executed right after an automatic recovery from a client reset has completed
        },
        OnAfterDiscard = (beforeFrozen, after) =>
        {
          // executed after an automatic recovery from a client reset has failed but the DiscardUnsyncedChanges fallback has completed
        },
        ManualResetFallback = (session, err) =>
        {
          // handle the reset manually
        }
      }
      };
      

      (PR #2745)

    • โฌ†๏ธ Introducing string query support for constant list expressions such as realm.All<Car>().Filter("Color IN {'blue', 'orange'}"). This also includes general query support for list vs list matching such as realm.All<Car>().Filter("NONE Features IN {'ABS', 'Seat Heating'}"). (Core upgrade)

    • ๐Ÿ‘Œ 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 upgrade)

    • โฌ†๏ธ 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 upgrade)

    • ๐Ÿ‘Œ Improve the performance of the sync changeset parser, which speeds up applying changesets from the server. (Core upgrade)

    ๐Ÿ›  Fixed

    • โž• Added a more meaningful error message whenever a project doesn't have [TargetFramework] defined. (Issue #2843)
    • Opening a read-only Realm for the first time with a SyncConfiguration did not set the schema version, which could lead to m_schema_version != ObjectStore::NotVersioned assertion failures. (Core upgrade)
    • โฌ†๏ธ Upload completion callbacks (i.e. Session.WaitForUploadAsync) may have called before the download message that completed them was fully integrated. (Core upgrade)
    • ๐Ÿ›  Fixed an exception "fcntl() with F_BARRIERFSYNC failed: Inappropriate ioctl for device" when running with MacOS on an exFAT drive. (Core upgrade)
    • โฌ†๏ธ Syncing of a Decimal128 with big significand could result in a crash. (Core upgrade)
    • โฌ†๏ธ Realm.Refresh() did not actually advance to the latest version in some cases. If there was a version newer than the current version which did not require blocking it would advance to that instead, contrary to the documented behavior. (Core upgrade)
    • โฌ†๏ธ Several issues around notifications were fixed. (Core upgrade)
      • Fix a data race on RealmCoordinator::m_sync_session which could occur if multiple threads performed the initial open of a Realm at once.
      • If a SyncSession outlived the parent Realm and then was adopted by a new Realm for the same file, other processes would not get notified for sync writes on that file.
      • Fix one cause of QoS inversion warnings when performing writes on the main thread on Apple platforms. Waiting for async notifications to be ready is now done in a QoS-aware ways.
    • ๐Ÿ”€ If you set a subscription on a link in flexible sync, the server would not know how to handle it (#5409, since v11.6.1)
    • โฌ†๏ธ If a case insensitive query searched for a string including an 4-byte UTF8 character, the program would crash. (Core upgrade)
    • โž• Added validation to prevent adding a removed object using Realm.Add. (Issue #3020)

    Compatibility

    • Realm Studio: 12.0.0 or later.

    Internal

    • Using Core 12.7.0.
  • v10.15.1 Changes

    August 08, 2022

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed an issue introduced in 10.15.0 that would prevent non-anonoymous user authentication against Atlas App Services. (Issue #2987)
    • โž• Added override to User.ToString() that outputs the user id and provider. (PR #2988)
    • โž• Added == and != operator overloads to User that matches the behavior of User.Equals. (PR #2988)

    Compatibility

    • Realm Studio: 12.0.0 or later.

    Internal

    • Using Core 12.4.0.
  • v10.15.0 Changes

    August 05, 2022

    โœจ Enhancements

    • ๐Ÿ‘ Preview support for .NET 6 with Mac Catalyst and MAUI. (PR #2959)
    • โฌ†๏ธ Reduce use of memory mappings and virtual address space (Core upgrade)

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fix a data race when opening a flexible sync Realm (Core upgrade).
    • ๐Ÿ›  Fixed a missing backlink removal when setting a RealmValue from a RealmObject to null or any other non-RealmObject value. Users may have seen exception of "key not found" or assertion failures such as mixed.hpp:165: [realm-core-12.1.0] Assertion failed: m_type when removing the destination object. (Core upgrade)
    • ๐Ÿ›  Fixed an issue on Windows that would cause high CPU usage by the sync client when there are no active sync sessions. (Core upgrade)
    • ๐Ÿ‘Œ Improved performance of sync clients during integration of changesets with many small strings (totalling > 1024 bytes per changeset) on iOS 14, and devices which have restrictive or fragmented memory. (Core upgrade)
    • ๐Ÿ›  Fix exception when decoding interned strings in realm-apply-to-state tool. (Core upgrade)
    • ๐Ÿ›  Fix a data race when committing a transaction while multiple threads are waiting for the write lock on platforms using emulated interprocess condition variables (most platforms other than non-Android Linux). (Core upgrade)
    • ๐Ÿ›  Fix some cases of running out of virtual address space (seen/reported as mmap failures) (Core upgrade)
    • โฌ†๏ธ Decimal128 values with more than 110 significant bits were not synchronized correctly with the server (Core upgrade)

    Compatibility

    • Realm Studio: 12.0.0 or later.

    Internal

    • Using Core 12.4.0.
  • v10.14.0 Changes

    June 02, 2022

    โœจ Enhancements

    • โž• Added a more efficient replacement for Realm.WriteAsync. The previous API would start a background thread, open the Realm there and run a synchronous write transaction on the background thread. The new API will asynchronously acquire the write lock (begin transaction) and asynchronously commit the transaction, but the actual write block will execute on the original thread. This means that objects/queries captured before the block can be used inside the block without relying on threadsafe references. Importantly, you can mix and match async and sync calls. And when calling any Realm.WriteAsync on a background thread the call is just run synchronously, so you should use Realm.Write for readability sake. The new API is made of Realm.WriteAsync<T>(Func<T> function, CancellationToken cancellationToken), Realm.WriteAsync(Action action, CancellationToken cancellationToken), Realm.BeginWriteAsync(CancellationToken cancellationToken) and Transaction.CommitAsync(CancellationToken cancellationToken). While the Transaction.Rollback() doesn't need an async counterpart. The deprecated API calls are Realm.WriteAsync(Action<Realm> action), Real.WriteAsync<T>(Func<Realm, IQueryable<T>> function), Realm.WriteAsync<T>(Func<Realm, IList<T>> function) and Realm.WriteAsync<T>(Func<Realm, T> function). Here is an example of usage: ```csharp using Realms;

    var person = await _realm.WriteAsync(() => { return _realm.Add( new Person { FirstName = "Marco" }); });

    // you can use/modify person now // without the need of using ThreadSafeReference

      (PR [#2899](https://github.com/realm/realm-dotnet/pull/2899))
    * โž• Added the method `App.DeleteUserFromServerAsync` to delete a user from the server. It will also invalidate the user locally as well as remove all their local data. It will not remove any data the user has uploaded from the server. (Issue [#2675](https://github.com/realm/realm-dotnet/issues/2675))
    * โž• Added boolean property `ChangeSet.IsCleared` that is true when the collection gets cleared. Also Realm collections now raise `CollectionChanged` event with action `Reset` instead of `Remove` when the collections is cleared. Please note that this will work only with collection properties, such as `IList` and `ISet`. (Issue [#2856](https://github.com/realm/realm-dotnet/issues/2856))
    * โž• Added `PopulateInitialSubscriptions` to `FlexibleSyncConfiguration` - this is a callback that will be invoked the first time a Realm is opened. It allows you to create the initial subscriptions that will be added to the Realm before it is opened. (Issue [#2913](https://github.com/realm/realm-dotnet/issues/2913))
    * โšก๏ธ Bump the SharedInfo version to 12. This requires update of any app accessing the file in a multiprocess scenario, including Realm Studio.
    * ๐Ÿ”€ The sync client will gracefully handle compensating write error messages from the server and pass detailed info to the SDK's sync error handler about which objects caused the compensating write to occur. ([#5528](https://github.com/realm/realm-core/pull/5528))
    
    ### ๐Ÿ›  Fixed
    * โž• Adding an object to a Set, deleting the parent object, and then deleting the previously mentioned object causes crash ([#5387](https://github.com/realm/realm-core/issues/5387))
    * ๐Ÿ”€ Flexible sync would not correctly resume syncing if a bootstrap was interrupted ([#5466](https://github.com/realm/realm-core/pull/5466))
    * ๐Ÿ”€ Flexible sync will now ensure that a bootstrap from the server will only be applied if the entire bootstrap is received - ensuring there are no orphaned objects as a result of changing the read snapshot on the server ([#5331](https://github.com/realm/realm-core/pull/5331))
    * ๐ŸŽ Partially fix a performance regression in write performance on Apple platforms. Committing an empty write transaction is ~10x faster than 10.13.0, but still slower than pre-10.7.1 due to using more crash-safe file synchronization (since v10.7.1). (Swift issue [#7740](https://github.com/realm/realm-swift/issues/7740)).
    
    ### Compatibility
    * Realm Studio: 11.0.0 or later.
    
    ### Internal
    * Using Core 12.1.0.
    
  • v10.13.0 Changes

    May 18, 2022

    โœจ Enhancements

    • โž• Added the functionality to convert Sync Realms into Local Realms and Local Realms into Sync Realms. (Issue #2746)
    • โž• Added support for a new client reset strategy, called Discard Unsynced Changes. This new stragegy greatly simplifies the handling of a client reset event on a synchronized Realm. ๐Ÿ—„ This addition makes Session.Error deprecated. In order to temporarily continue using the current Session.Error the following must be done: csharp var conf = new PartitionSyncConfiguration(partition, user) { ClientResetHandler = new ManualRecoveryHandler(); }; In order to take advantage of the new Discard Unsynced Changes feature, the following should be done (all callbacks are optional): csharp var conf = new PartitionSyncConfiguration(partition, user) { ClientResetHandler = new DiscardLocalResetHandler { OnBeforeReset = (beforeFrozen) => { // executed right before a client reset is about to happen }, OnAfterReset = (beforeFrozen, after) => { // executed right after a client reset is has completed }, ManualResetFallback = (session, err) => { // handle the reset manually } } }; If, instead, you want to continue using the manual solution even after the end of the deprecation period, the following should be done csharp var conf = new PartitionSyncConfiguration(partition, user) { ClientResetHandler = new ManualRecoveryHandler((sender, e) => { // user's code for manual recovery });

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed a System.DllNotFoundException being thrown by Realm APIs at startup on Xamarin.iOS (Issue #2926, since 10.12.0)

    Compatibility

    • Realm Studio: 11.0.0 or later.

    Internal

    • Using Core 11.14.0.
  • v10.12.0 Changes

    May 05, 2022

    โœจ Enhancements

    • ๐Ÿ‘ Preview support for .NET 6 with iOS, Android, and MAUI. We've added tentative support for the new .NET 6 Mobile workloads (except MacCatalyst, which will be enabled later). The .NET tooling itself is still in preview so we don't have good test coverage of the new platforms just yet. Please report any issues you find at https://github.com/realm/realm-dotnet/issues/new/choose.

    Compatibility

    • Realm Studio: 11.0.0 or later.

    Internal

    • Using Core 11.14.0.
  • v10.11.2 Changes

    April 12, 2022

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed corruption bugs when encryption is used. (Core Issue #5360)

    Compatibility

    • Realm Studio: 11.0.0 or later.

    Internal

    • Using Core 11.14.0.
  • v10.11.1 Changes

    March 31, 2022

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed an issue that would cause the managed HttpClientHandler to be used in Xamarin applications, even if the project is configured to use the native one. (Issue #2892)

    Compatibility

    • Realm Studio: 11.0.0 or later.

    Internal

    • Using Core 11.12.0.