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>
whereT
can be any ๐ type supported by Realm, except for anotherIList
. 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 usingRealm.GetInstance
orRealm.GetInstanceAsync
and exposes aGetBackupRealmConfig
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 onRealmObject
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 callingRealm.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 aforeach
loop. (#1589)
๐ Bug fixes
- โ
Realm.GetInstance
will now advance the Realm to the latest version, so you no longer have to callRefresh
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 parameterobject 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, passnull
. (#1381)AcceptPermissionOfferAsync
now returns the relative rather than the absolute url of the Realm the user has been granted permissions to. (#1595)
- โ Added support for collections of primitive values. You can now define properties as