Skip to content

Releases: realm/realm-dart

20.0.0

09 Sep 16:38
75bb28c
Compare
Choose a tag to compare

20.0.0 (2024-09-09)

Breaking Changes

  • Removed all functionality related to App Services/Atlas Device Sync.

Compatibility

  • Realm Studio: 15.0.0 or later.

Internal

  • Using Core 20.0.1.

3.4.1

14 Aug 13:44
4e9a5c0
Compare
Choose a tag to compare

3.4.1 (2024-08-14)

Fixed

  • Fixed ejson dependency to 0.4.0.

Compatibility

  • Realm Studio: 15.0.0 or later.

Internal

  • Using Core 14.11.0.

3.4.0

13 Aug 19:46
ed592e6
Compare
Choose a tag to compare

3.4.0 (2024-08-13)

Enhancements

  • Added a new parameter of type SyncTimeoutOptions to AppConfiguration. It allows users to control sync timings, such as ping/pong intervals as well various connection timeouts. (Issue #1763)
  • Added a new parameter cancelAsyncOperationsOnNonFatalErrors on Configuration.flexibleSync that allows users to control whether non-fatal errors such as connection timeouts should be surfaced in the form of errors or if sync should try and reconnect in the background. (PR #1764)
  • Allow nullable and other optional fields to be absent in EJson, when deserializing realm objects. (Issue #1735)

Fixed

  • Fixed an issue where creating a flexible sync configuration with an embedded object not referenced by any top-level object would throw a "No such table" exception with no meaningful information about the issue. Now a RealmException will be thrown that includes the offending object name, as well as more precise text for what the root cause of the error is. (PR #1748)
  • AppConfiguration.maxConnectionTimeout never had any effect and has been deprecated in favor of SyncTimeoutOptions.connectTimeout. (PR #1764)
  • Pure dart apps, when compiled to an exe and run from outside the project directory would fail to load the native shared library. (Issue #1765)

Compatibility

  • Realm Studio: 15.0.0 or later.

Internal

  • Using Core x.y.z.

3.3.0

20 Jul 00:35
d715ddc
Compare
Choose a tag to compare

3.3.0 (2024-07-20)

Enhancements

  • On Windows devices Device Sync will additionally look up SSL certificates in the Windows Trusted Root Certification Authorities certificate store when establishing a connection. (Core 14.11.0)
  • Role and permissions changes no longer require a client reset to update the local realm. (Core 14.11.0)

Fixed

  • When a public name is defined on a property (using @MapTo), calling query("... SORT/DISTINCT(mapped-to-name)") with the internal name could throw an error like Cannot sort on key path 'NAME': property 'PersonObject.NAME' does not exist. (Core 14.10.4)

Compatibility

  • Realm Studio: 15.0.0 or later.

Internal

  • Using Core 14.11.0.

3.2.0

11 Jul 00:46
a43333e
Compare
Choose a tag to compare

3.2.0 (2024-07-10)

Enhancements

  • "Next launch" metadata file actions are now performed in a multi-process safe manner. (Core 14.10.3)
  • Performance has been improved for range queries on integers and timestamps. Requires that you use the "BETWEEN" in the realm.query<T>() method when you build the query. (Core 14.10.1)
  • Include the originating client reset error in AutoClientResetFailure errors. (Core 14.10.0)
  • Reduce the size of the local transaction log produced by creating objects, improving the performance of insertion-heavy transactions. (Core 14.10.0)
  • Make SubscriptionSet an abstract interface class, to allow mocking. (Issue #1744)

Fixed

  • Fixed an issue that affects sync apps that use embedded objects which have a List<RealmValue> that contains a link to another top level object which has been deleted by another sync client (creating a tombstone locally). In this particular case, the switch would cause any remaining link removals to recursively delete the destination object if there were no other links to it. (Core v14.10.3)
  • Fixed removing backlinks from the wrong objects if the link came from a nested list, nested dictionary, top-level map, or List<RealmValue>, and the source table had more than 256 objects. This could manifest as array_backlink.cpp:112: Assertion failed: int64_t(value >> 1) == key.value when removing an object. (Core 14.10.3)
  • Fixed the collapse/rejoin of clusters which contained nested collections with links. This could manifest as array.cpp:319: Array::move() Assertion failed: begin <= end [2, 1] when removing an object. (Core 14.10.3)
  • waitForUpload() was inconsistent in how it handled commits which did not produce any changesets to upload. Previously it would sometimes complete immediately if all commits waiting to be uploaded were empty, and at other times it would wait for a server roundtrip. It will now always complete immediately. (Core v14.10.3).
  • Opening an FLX realm asynchronously may not wait to download all data (Core 14.10.1).
  • Clearing a List of Mixed in an upgraded file would lead to an assertion failing (Core 14.10.1)
  • Fix some client resets (such as migrating to flexible sync) potentially failing with AutoClientResetFailed if a new client reset condition (such as rolling back a flexible sync migration) occurred before the first one completed. (Core 14.10.0)
  • Encrypted files on Windows had a maximum size of 2GB even on x64 due to internal usage of off_t, which is a 32-bit type on 64-bit Windows. (Core 14.10.0)
  • The encryption code no longer behaves differently depending on the system page size, which should entirely eliminate a recurring source of bugs related to copying encrypted Realm files between platforms with different page sizes. (Core 14.10.0)
  • There were several complicated scenarios which could result in stale reads from encrypted files in multiprocess scenarios. These were very difficult to hit and would typically lead to a crash, either due to an assertion failure or DecryptionFailure being thrown. (Core 14.10.0)
  • Tokenizing strings for full-text search could fail. (Core 14.10.0)

Compatibility

  • Realm Studio: 15.0.0 or later.

Internal

  • Using Core 14.10.3

3.1.0

25 Jun 13:53
52ec31c
Compare
Choose a tag to compare

3.1.0 (2024-06-25)

Enhancements

  • The download progress estimate reported by Session.getProgressStream will now return meaningful estimated values, while previously it always returned 1. (Issue #1564)

Fixed

  • sane_uuid 1.0.0 was released, which has a few minor breaking change as compared to to 1.0.0-rc.5 that impact realm:

    • The Uuid.fromBytes factory now accepts a Uint8List instead of a ByteBuffer
    • The type of Uuid.bytes has changed to Uint8List.

    Issue #1729

Compatibility

  • Realm Studio: 15.0.0 or later.

Internal

  • Using Core x.y.z.

3.0.0

07 Jun 15:38
925963c
Compare
Choose a tag to compare

3.0.0 (2024-06-07)

Breaking Changes

  • To avoid dependency on dart:io

    • AppConfiguration.httpClient is now of type Client and
    • AppConfiguration.baseFilePath is now of type String.

    Assuming you are configuring these today, migration is easy:

    import 'dart:io';
    import 'package:realm_dart/realm.dart';
    
    final client = HttpClient();
    final dir = Directory.current;
    final config = AppConfiguration(
      'your-app-id',
      httpClient: client,
      baseFilePath: dir,
    );

    becomes:

    import 'dart:io';
    import 'package:realm_dart/realm.dart';
    import 'package:http/io_client.dart';
    
    final client = HttpClient();
    final dir = Directory.current;
    final config = AppConfiguration(
      'your-app-id',
      httpClient: IOClient(client),
      baseFilePath: dir.path,
    );

    (Issue #1374)

Enhancements

  • Report the originating error that caused a client reset to occur. (Core 14.9.0)
  • Allow the realm package, and code generated by realm_generator to be included when building
    for web without breaking compilation. (Issue #1374,
    PR #1713). This does not imply that realm works on web!

Fixed

  • Realm.writeAsync did not handle async callbacks (Future<T> Function()) correctly. (Issue #1667)
  • Fixed an issue that would cause macOS apps to be rejected with Invalid Code Signing Entitlements error. (Issue #1679)
  • Fixed a regression that makes it inconvenient to run unit tests using realm. (Issue #1619)
  • After compacting, a file upgrade would be triggered. This could cause loss of data if schema mode is SoftResetFile (Core 14.9.0)
  • A non-streaming progress notifier would not immediately call its callback after registration. Instead you would have to wait for a download message to be received to get your first update - if you were already caught up when you registered the notifier you could end up waiting a long time for the server to deliver a download that would call/expire your notifier (Core 14.8.0).
  • Comparing a numeric property with an argument list containing a string would throw. (Core 14.8.0)

Compatibility

  • Realm Studio: 15.0.0 or later.
  • Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10.

Internal

  • Using Core 14.9.0.
  • Disabled codesigning of Apple binaries. (Issue #1679)
  • Drop building xcframework for catalyst. (Issue #1695)
  • Using xcode 15.4 for native build. (Issue #1547)
  • Using puro on CI. (#1710)

2.3.0

23 May 09:54
c036f42
Compare
Choose a tag to compare

2.3.0 (2024-05-23)

Enhancements

  • Added support for creating and storing a RealmObject using the Realm.dynamic API: realm.dynamic.create("Person", primaryKey: 123). (PR #1669)
  • Added support for setting properties on a RealmObject using the dynamic API: obj.dynamic.set("name", "Peter"). (PR #1669)
  • Listening for .changes on a dynamic object (obtained via the realm.dynamic API) no longer throws. (Issue #1668)
  • Nested collections have full support for automatic client reset. (Core 14.7.0)

Fixed

  • Private fields did not work with default values. (Issue #1663)

  • Invoke scheduler callback on Zone.current. (Issue #1676)

  • Having links in a nested collections would leave the file inconsistent if the top object is removed. (Core 14.7.0)

  • Accessing App.currentUser from within a notification produced by App.switchUser() (which includes notifications for a newly logged in user) would deadlock. (Core 14.7.0)

  • Inserting the same typed link to the same key in a dictionary more than once would incorrectly create multiple backlinks to the object. This did not appear to cause any crashes later, but would have affecting explicit backlink count queries (eg: ...@links.@count) and possibly notifications. (Core 14.7.0)

Compatibility

  • Realm Studio: 15.0.0 or later.

Internal

  • Using Core 14.7.0.

2.2.1

03 May 00:05
03d92d3
Compare
Choose a tag to compare

2.2.1 (2024-05-02)

Fixed

  • realm_privacy bundle mistakenly included an exe-file preventing app store submissions. (Issue #1656)

Compatibility

  • Realm Studio: 15.0.0 or later.

Internal

  • Using Core 14.6.2.

2.2.0

01 May 19:24
4597ec3
Compare
Choose a tag to compare

2.2.0 (2024-05-01)

Enhancements

  • Allow configuration of generator per model class. Currently support specifying the constructor style to use.
    const config = GeneratorConfig(ctorStyle: CtorStyle.allNamed);
    const realmModel = RealmModel.using(baseType: ObjectType.realmObject, generatorConfig: config);
    
    @realmModel
    class _Person {
      late String name;
      int age = 42;
    }
    will generate a constructor like:
    Person({
      required String name,
      int age = 42,
    }) { ... }
    (Issue #292)
  • Add privacy manifest to apple binaries. (Issue #1551)

Fixed

  • Avoid: Attempt to execute code removed by Dart AOT compiler (TFA). (Issue #1647)
  • Fixed nullability annotations for the experimental API App.baseUrl and App.updateBaseUrl. The former is guaranteed not to be null, while the latter will now accept a null argument, in which case the base url will be restored to its default value. (Issue #1523)
  • App.users included logged out users only if they were logged out while the App instance existed. It now always includes all logged out users. (Core 14.6.0)
  • Fixed several issues around encrypted file portability (copying a "bundled" encrypted Realm from one device to another): (Core 14.6.0)
    • Fixed Assertion failed: new_size % (1ULL << m_page_shift) == 0 when opening an encrypted Realm less than 64Mb that was generated on a platform with a different page size than the current platform.
    • Fixed a DecryptionFailed exception thrown when opening a small (<4k of data) Realm generated on a device with a page size of 4k if it was bundled and opened on a device with a larger page size.
    • Fixed an issue during a subsequent open of an encrypted Realm for some rare allocation patterns when the top ref was within ~50 bytes of the end of a page. This could manifest as a DecryptionFailed exception or as an assertion: encrypted_file_mapping.hpp:183: Assertion failed: local_ndx < m_page_state.size().
  • Schema initialization could hit an assertion failure if the sync client applied a downloaded changeset while the Realm file was in the process of being opened. (Core 14.6.0)
  • Improve perfomance of "chained OR equality" queries for UUID/ObjectId types and RQL parsed "IN" queries on string/int/uuid/objectid types. (Core 14.6.0)
  • Fixed a bug when running a IN query (or a query of the pattern x == 1 OR x == 2 OR x == 3) when evaluating on a string property with an empty string in the search condition. Matches with an empty string would have been evaluated as if searching for a null string instead. (Core 14.6.2)

Compatibility

  • Realm Studio: 15.0.0 or later.

Internal

  • Using Core 14.6.2.
  • Flutter: ^3.19.0
  • Dart: ^3.3.0