Realm Xamarin v3.0.0 Release Notes

Release Date: 2018-04-25 // almost 6 years ago
  • โœจ Enhancements

    • ๐Ÿ‘ Allow [MapTo] to be applied on classes to change the name of the table corresponding to that class. (#1712)
    • โž• Added an improved API for adding subscriptions in partially-synchronized Realms. IQueryable<T>.Subscribe can be used
      to subscribe to any query, and the returned Subscription<T> object can be used to observe the state of the subscription
      ๐Ÿ“š and ultimately remove the subscription. See the documentation
      for more information. (#1679)
    • โž• Added a fine-grained permissions system for use with partially-synchronized Realms. This allows permissions to be
      ๐Ÿ‘€ defined at the level of individual objects or classes. See the
      ๐Ÿ“š documentation
      for more information. (#1714)
    • ๐Ÿ”ฆ Exposed a string-based IQueryable<T>.Filter(predicate) method to enable more advanced querying
      scenarios such as:
      • Following links: realm.All<Dog>().Filter("Owner.FirstName BEGINSWITH 'J'").
      • Queries on collections: realm.All<Child>().Filter("Parents.FirstName BEGINSWITH 'J'") - find all
        children who have a parent whose name begins with J or realm.All<Child>().Filter("[email protected] > 50") -
        find all children whose parents' average age is more than 50.
      • Subqueries: realm.All<Person>().Filter("SUBQUERY(Dogs, $dog, $dog.Vaccinated == false).@count > 3") - find all
        people who have more than 3 unvaccinated dogs.
      • Sorting: realm.All<Dog>().Filter("TRUEPREDICATE SORT(Owner.FirstName ASC, Age DESC)") - find all dogs and
        sort them by their owner's first name in ascending order, then by the dog's age in descending.
      • Distinct: realm.All<Dog>().Filter("TRUEPREDICATE DISTINCT(Age) SORT(Name)") - find all dogs, sort them
        by their name and pick one dog for each age value.
      • For more examples, check out the
        ๐Ÿ“„ javascript query language docs -
        the query syntax is identical - or the NSPredicate Cheatsheet.
    • ๐Ÿ”€ The SyncConfiguration constructor now accepts relative Uris. (#1720)
    • โž• Added the following methods for resetting the user's password and confirming their email:
      RequestPasswordResetAsync, CompletePasswordResetAsync, RequestEmailConfirmationAsync, and ConfirmEmailAsync.
      These all apply only to users created via Credentials.UsernamePassword who have provided their email as
      the username. (#1721)

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  Fixed a bug that could cause deadlocks on Android devices when resolving thread safe references. (#1708)

    ๐Ÿ’ฅ Breaking Changes

    • ๐Ÿ”€ Uses the Sync 3.0 client which is incompatible with ROS 2.x.
    • Permission has been renamed to PathPermission to more closely reflect its purpose.
      Furthermore, existing methods to modify permissions only work on full Realms. New methods
      ๐Ÿ”ง and classes are introduced to configure access to a partially synchronized Realm.
    • 0๏ธโƒฃ The type of RealmConfiguration.DefaultConfiguration has changed to RealmConfigurationBase to allow
      0๏ธโƒฃ any subclass to be set as default. (#1720)
    • ๐Ÿ”€ The SyncConfiguration constructor arguments are now optional. The user value will default to the
      0๏ธโƒฃ currently logged in user and the serverUri value will default to realm://MY-SERVER-URL/default where
      MY-SERVER-URL is the host the user authenticated against. (#1720)
    • The serverUrl argument in User.LoginAsync(credentials, serverUrl) and User.GetLoggedInUser(identity, serverUrl)
      has been renamed to serverUri for consistency. (#1721)