Realm Xamarin v2.0.0 Release Notes

Release Date: 2017-10-17 // over 6 years ago
  • โœจ Enhancements

    • โž• Added support for collections of primitive values. You can now define properties as IList<T> where T can be any ๐Ÿ‘ type supported by Realm, except for another IList. As a result, a lot of methods that previously had constraints on ๐Ÿ‘ป RealmObject now accept any type and may throw a runtime exception if used with an unsupported type argument. (#1517)
    • โž• Added HelpLink pointing to the relevant section of the documentation to most Realm exceptions. (#1521)
    • โž• Added RealmObject.GetBacklinks API to dynamically obtain all objects referencing the current one. (#1533)
    • โž• Added a new exception type, PermissionDeniedException, to denote permission denied errors when working with synchronized Realms that ๐Ÿ”ฆ exposes a method - DeleteRealmUserInfo - to inform the binding that the offending Realm's files should be kept or deleted immediately. This allows recovering from permission denied errors in a more robust manner. (#1543)
    • ๐Ÿ“‡ The keychain service name used by Realm to manage the encryption keys for sync-related metadata on Apple platforms is now set to the bundle identifier. Keys that were previously stored within the Realm-specific keychain service will be transparently migrated to the per-application keychain service. (#1522)
    • โž• Added a new exception type - IncompatibleSyncedFileException - that allows you to handle and perform data migration from a legacy (1.x) Realm file to the new 2.x format. It can be thrown when using Realm.GetInstance or Realm.GetInstanceAsync and exposes a GetBackupRealmConfig method that allows you to open the old Realm file in a dynamic mode and migrate any required data. (#1552)
    • ๐Ÿ Enable encryption on Windows. (#1570)
    • ๐Ÿ Enable Realm compaction on Windows. (#1571)
    • ๐Ÿ“‡ UserInfo has been significantly enhanced. It now contains metadata about a user stored on the Realm Object Server, as well as a list of all user account data associated with that user. (#1573)
    • ๐Ÿ”€ Introduced a new method - User.LogOutAsync to replace the now-deprecated synchronous call. (#1574)
    • ๐Ÿ”ฆ Exposed BacklinksCount property on RealmObject that returns the number of objects that refer to the current object via a to-one or a to-many relationship. (#1578)
    • ๐Ÿ‘ String primary keys now support null as a value. (#1579)
    • โž• Add preview support for partial synchronization. Partial synchronization allows a synchronized Realm to be opened in such a way ๐Ÿ”€ that only objects requested by the user are synchronized to the device. You can use it by setting the IsPartial property on a ๐Ÿ”€ SyncConfiguration, opening the Realm, and then calling Realm.SubscribeToObjectsAsync with the type of object you're interested in, a string containing a query determining which objects you want to subscribe to, and a callback which will report the results. You may โž• add as many subscriptions to a synced Realm as necessary. (#1580)
    • Ensure that Realm collections (IList<T>, IQueryable<T>) will not change when iterating in a foreach loop. (#1589)

    ๐Ÿ› Bug fixes

    • โœ… Realm.GetInstance will now advance the Realm to the latest version, so you no longer have to call Refresh manually after that. (#1523)
    • ๐Ÿ›  Fixed an issue that would prevent iOS Share Extension projects from working. (#1535)

    ๐Ÿ’ฅ Breaking Changes

    • Realm.CreateObject(string className) now has additional parameter object primaryKey. You must pass that when creating a new object using the dynamic API. If the object you're creating doesn't have primary key declared, pass null. (#1381)
    • AcceptPermissionOfferAsync now returns the relative rather than the absolute url of the Realm the user has been granted permissions to. (#1595)