Realm 11.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Realm --version 11.0.0
NuGet\Install-Package Realm -Version 11.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Realm" Version="11.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Realm --version 11.0.0
#r "nuget: Realm, 11.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Realm as a Cake Addin
#addin nuget:?package=Realm&version=11.0.0

// Install Realm as a Cake Tool
#tool nuget:?package=Realm&version=11.0.0

Realm is a mobile database: a replacement for SQLite

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid is compatible. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios is compatible. 
Xamarin.Mac xamarinmac is compatible. 
Xamarin.TVOS xamarintvos is compatible. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (39)

Showing the top 5 NuGet packages that depend on Realm:

Package Downloads
ppy.osu.Game

Package Description

Iridium360.Connect.Framework

This framework allows you to bind your Android or iOS device with i360RockSTAR tracker

ItEnterprise.Common.CoreStandard

ItEnterprise Common.CoreStandard for Xamarin Forms

Arc4u.Standard.Diagnostics.Serilog.Sinks.RealmDb

Arc4u Diagnostics Serilog Sink to RealmDB

ItEnterprise.WmsStandard

ItEnterprise WmsStandard for Xamarin Forms

GitHub repositories (5)

Showing the top 5 popular GitHub repositories that depend on Realm:

Repository Stars
ppy/osu
rhythm is just a *click* away!
realm/realm-dotnet
Realm is a mobile database: a replacement for SQLite & ORMs
sgermosen/xReader
XML, NEWS, RSS & Scrapping Reader maked in Xamarin, for educational purpose.
realm/realm-draw
The official Realm Draw app used in promotional videos
dsa28s/windows-hangul-clock
Hangul Clock for Windows Desktop Widget
Version Downloads Last updated
12.0.0 2,948 4/17/2024
11.7.0 51,738 2/5/2024
11.6.1 60,834 11/17/2023
11.6.0 12,514 11/4/2023
11.5.0 165,994 9/16/2023
11.4.0 24,175 8/16/2023
11.3.0 32,163 7/26/2023
11.2.0 14,892 7/8/2023
11.1.2 97,002 6/20/2023
11.1.1 5,771 6/19/2023
11.1.0 2,609 6/17/2023
11.0.0 36,946 5/8/2023
10.21.1 33,193 4/21/2023
10.21.0 22,376 3/24/2023
10.20.0 86,330 2/10/2023
10.19.0 32,371 1/6/2023
10.18.0 124,582 11/2/2022
10.17.0 85,829 10/6/2022
10.16.0 12,608 10/3/2022
10.15.1 104,349 8/8/2022
10.15.0 5,526 8/5/2022
10.14.0 171,875 6/2/2022
10.13.0 26,929 5/18/2022
10.12.0 18,076 5/5/2022
10.11.2 34,675 4/21/2022
10.11.1 20,642 3/31/2022
10.11.0 5,414 3/28/2022
10.10.0 94,568 2/28/2022
10.9.0 73,508 1/21/2022
10.8.0 37,669 1/17/2022
10.7.1 101,806 11/20/2021
10.7.0 7,111 11/10/2021
10.6.0 158,060 9/30/2021
10.5.1 17,996 9/22/2021
10.5.0 30,526 9/9/2021
10.4.1 3,681 9/3/2021
10.4.0 11,259 8/31/2021
10.3.0 137,306 7/7/2021
10.2.1 26,676 7/1/2021
10.2.0 26,539 6/15/2021
10.2.0-beta.2 761 5/5/2021
10.2.0-beta.1 350 4/12/2021
10.1.4 19,059 5/12/2021
10.1.3 20,307 4/29/2021
10.1.2 29,374 3/19/2021
10.1.1 22,096 2/25/2021
10.1.0 13,150 2/9/2021
10.0.1 6,834 2/2/2021
10.0.0-beta.6 430 1/26/2021
10.0.0-beta.5 636 1/19/2021
10.0.0-beta.3 1,151 12/10/2020
10.0.0-beta.2 1,464 11/4/2020
10.0.0-beta.1 727 10/16/2020
10.0.0-alpha.43 360 10/9/2020
10.0.0-alpha.34 470 10/4/2020
5.1.3 24,878 2/10/2021
5.1.2 83,574 10/20/2020
5.1.1 27,551 10/2/2020
5.1.0 6,622 9/30/2020
5.0.1 10,720 9/9/2020
4.3.0 270,694 2/5/2020
4.2.0 69,667 10/8/2019
4.1.0 86,398 8/6/2019
4.0.1 20,018 6/27/2019
4.0.0 6,256 6/14/2019
3.4.0 101,140 1/9/2019
3.3.0 26,280 11/8/2018
3.2.1 44,008 9/27/2018
3.2.0 15,192 9/4/2018
3.1.0 32,505 7/4/2018
3.0.0 108,373 4/16/2018
2.2.0 12,699 3/22/2018
2.1.0 54,577 11/13/2017
2.0.0 18,271 10/17/2017
2.0.0-rc1 2,572 10/3/2017
1.6.0 35,392 8/15/2017
1.5.0 17,975 6/20/2017
1.4.0 14,880 5/19/2017
1.3.0 3,722 5/16/2017
1.2.1 7,937 5/1/2017
1.2.0 5,946 4/4/2017
1.1.1 7,497 3/15/2017
1.1.0 3,650 3/3/2017
1.0.4 4,880 2/21/2017
1.0.3 17,054 2/14/2017
0.82.1 18,468 1/27/2017
0.82.0 3,338 1/23/2017
0.81.0 5,428 12/15/2016
0.80.0 11,534 10/27/2016
0.78.1 20,583 9/15/2016
0.78.0 2,744 9/11/2016
0.77.2 5,616 8/11/2016
0.77.1 3,176 7/28/2016
0.76.1 6,070 6/15/2016
0.76.0 3,386 6/9/2016
0.75.0 3,216 6/3/2016
0.74.1 5,789 5/10/2016

## 11.0.0 (2023-05-08)

### Breaking changes
* The `error` argument in `NotificationCallbackDelegate` and `DictionaryNotificationCallbackDelegate` used in `*collection*.SubscribeForNotifications` has been removed. It has been unused for a long time, since internal changes to the database made it impossible for errors to occur during notification callbacks. (Issue [#3014](https://github.com/realm/realm-dotnet/issues/3014))
* Removed `RealmObjectBase.GetBacklinks` - instead `RealmObjectBase.DynamicApi.GetBacklinksFromType` should be used. (Issue [#2391](https://github.com/realm/realm-dotnet/issues/2391))
* Removed `Realm.DynamicApi.CreateObject(string, object)` and replaced it with more specialized overloads:
 * `RealmObjectBase.DynamicApi.CreateObject(string)` can be used to create an object without a primary key.
 * `RealmObjectBase.DynamicApi.CreateObject(string, string/long?/ObjectId?/Guid?)` can be used to create an object with a primary key of the corresponding type.
* The API exposed by `Realm.DynamicApi` no longer return `dynamic`, instead opting to return concrete types, such as `IRealmObject`, `IEmbeddedObject`, and so on. You can still cast the returned objects to `dynamic` and go through the dynamic API, but that's generally less performant than using the string-based API, such as `IRealmObjectBase.DynamicApi.Get/Set`, especially on AOT platforms such as iOS or Unity. (Issue [#2391](https://github.com/realm/realm-dotnet/issues/2391))
* Removed `Realm.WriteAsync(Action<Realm>)` in favor of `Realm.WriteAsync(Action)`. The new `WriteAsync` method introduced in 10.14.0 is more efficient and doesn't require reopening the Realm on a background thread. While not recommended, if you prefer to get the old behavior, you can write an extension method like:
 ```csharp
 public static async Task WriteAsync(this Realm realm, Action<Realm> writeAction)
 {
   await Task.Run(() =>
   {
     using var bgRealm = Realm.GetInstance(realm.Config);
     bgRealm.Write(() =>
     {
       writeAction(bgRealm);
     });
   });

   await realm.RefreshAsync();
 }
 ```
 (PR [#3234](https://github.com/realm/realm-dotnet/pull/3234))
* Removed `InMemoryConfiguration.EncryptionKey`. It was never possible to encrypt in-memory Realms and setting that property would have resulted in runtime errors. (PR [#3236](https://github.com/realm/realm-dotnet/pull/3236))
* Removed `SyncConfiguration` - use `PartitionSyncConfiguration` or `FlexibleSyncConfiguration` instead. (PR [#3237](https://github.com/realm/realm-dotnet/pull/3237))
* Removed `Realm.GetSession` - use `Realm.SyncSession` instead. (PR [#3237](https://github.com/realm/realm-dotnet/pull/3237))
* Removed `DiscardLocalResetHandler` - use `DiscardUnsyncedChangedHandler` instead. (PR [#3237](https://github.com/realm/realm-dotnet/pull/3237))
* Removed `Session.SimulateClientReset` extensions. These didn't work with automatic reset handlers and were more confusing than helpful. (PR [#3237](https://github.com/realm/realm-dotnet/pull/3237))
* Removed `AppConfiguration.CustomLogger` and `AppConfiguration.LogLevel` - use `Logger.Default` and `Logger.LogLevel` instead. (PR [#3238](https://github.com/realm/realm-dotnet/pull/3238))
* Removed `RealmConfigurationBase.ObjectClasses` - use `RealmConfigurationBase.Schema` instead. (PR [#3240](https://github.com/realm/realm-dotnet/pull/3240))
* Removed `ObjectSchema.IsEmbedded` - use `ObjectSchema.BaseType` instead. (PR [#3240](https://github.com/realm/realm-dotnet/pull/3240))
* Removed `ObjectSchema.Builder.IsEmbedded` - use `ObjectSchema.Builder.RealmSchemaType` instead. (PR [#3240](https://github.com/realm/realm-dotnet/pull/3240))
* Removed `ObjectSchema.Builder(string name, bool isEmbedded = false)` - use `Builder(string name, ObjectSchemaType schemaType)` instead. (PR [#3240](https://github.com/realm/realm-dotnet/pull/3240))
* Removed `RealmSchema.Find` - use `RealmSchema.TryFindObjectSchema` instead. (PR [#3240](https://github.com/realm/realm-dotnet/pull/3240))
* Removed `User.GetPushClient` as it has been deprecated in Atlas App Services - see https://www.mongodb.com/docs/atlas/app-services/reference/push-notifications/. (PR [#3241](https://github.com/realm/realm-dotnet/pull/3241))
* Removed `SyncSession.Error` event - use `SyncConfigurationBase.OnSessionError` when opening a Realm instead. (PR [#3241](https://github.com/realm/realm-dotnet/pull/3242))
* Removed the parameterless constructor for `ManualRecoveryHandler` - use the one that takes a callback instead. (PR [#3241](https://github.com/realm/realm-dotnet/pull/3242))
* `RealmValue.AsString` will now throw an exception if the value contains `null`. If you want to get a nullable string, use `AsNullableString`. (PR [#3245](https://github.com/realm/realm-dotnet/pull/3245))
* `RealmValue.AsData` will now throw an exception if the value contains `null`. If you want to get a nullable `byte[]`, use `AsNullableData`. (PR [#3245](https://github.com/realm/realm-dotnet/pull/3245))
* `RealmValue.AsRealmObject` will now throw an exception if the value contains `null`. If you want to get a nullable string, use `AsNullableRealmObject`. (PR [#3245](https://github.com/realm/realm-dotnet/pull/3245))
* `Realm.SyncSession` will now throw an error if the Realm is not opened with a `PartitionSyncConfiguration` or `FlexibleSyncConfiguration` - before it used to return `null`. (PR [#3245](https://github.com/realm/realm-dotnet/pull/3245))
* `Realm.Subscriptions` will now throw an error if the Realm is not opened with a `FlexibleSyncConfiguration` - before it used to return `null`. (PR [#3245](https://github.com/realm/realm-dotnet/pull/3245))
* Removed `PermissionDeniedException` as it was no longer possible to get it. (Issue [#3272](https://github.com/realm/realm-dotnet/issues/3272))
* Removed some obsolete error codes from the `ErrorCode` enum. All codes removed were obsolete and no longer emitted by the server. (PR [3273](https://github.com/realm/realm-dotnet/issues/3273))
* Removed `IncompatibleSyncedFileException` as it was no longer possible to get it. (Issue [#3167](https://github.com/realm/realm-dotnet/issues/3167))
* The `Realms.Schema.Property` API now use `IndexType` rather than a boolean indicating whether a property is indexed. (Issue [#3281](https://github.com/realm/realm-dotnet/issues/3281))
* The extension methods in `StringExtensions` (`Like`, `Contains`) are now deprecated. Use the identical ones in `QueryMethods` instead - e.g. `realm.All<Foo>().Where(f => f.Name.Like("Mic*l"))` would need to be rewritten like `realm.All<Foo>().Where(f => QueryMethods.Like(f.Name, "Mic*l"))`.

### Enhancements
* Added nullability annotations to the Realm assembly. Now methods returning reference types are correctly annotated to indicate whether the returned value may or may not be null. (Issue [#3248](https://github.com/realm/realm-dotnet/issues/3248))
* Replacing a value at an index (i.e. `myList[1] = someObj`) will now correctly raise `CollectionChange` notifications with the `Replace` action. (Issue [#2854](https://github.com/realm/realm-dotnet/issues/2854))
* It is now possible to change the log level at any point of the application's lifetime. (PR [#3277](https://github.com/realm/realm-dotnet/pull/3277))
* Some log messages have been added to the Core database. Events, such as opening a Realm or committing a transaction will now be logged. (Issue [#2910](https://github.com/realm/realm-dotnet/issues/2910))
* Added support for Full-Text search (simple term) queries. (Issue [#3281](https://github.com/realm/realm-dotnet/issues/3281))
 * To enable FTS queries on string properties, add the `[Indexed(IndexType.FullText)]` attribute.
 * To run LINQ queries, use `QueryMethods.FullTextSearch`: `realm.All<Book>().Where(b => QueryMethods.FullTextSearch(b.Description, "fantasy novel"))`.
 * To run `Filter` queries, use the `TEXT` operator: `realm.All<Book>().Filter("Description TEXT $0", "fantasy novel")`.
* Performance improvement for the following queries (Core 13.8.0):
 * Significant (~75%) improvement when counting (`IQueryable.Count()`) the number of exact matches (with no other query conditions) on a string/int/UUID/ObjectID property that has an index. This improvement will be especially noticiable if there are a large number of results returned (duplicate values).
 * Significant (~99%) improvement when querying for an exact match on a `DateTimeOffset` property that has an index.
 * Significant (~99%) improvement when querying for a case insensitive match on a `RealmValue` property that has an index.
 * Moderate (~25%) improvement when querying for an exact match on a Boolean property that has an index.
 * Small (~5%) improvement when querying for a case insensitive match on a `RealmValue` property that does not have an index.
 * Moderate (~30%) improvement of equality queries on a non-indexed `RealmValue`.
* Enable multiple processes to operate on an encrypted Realm simultaneously. (Core 13.9.0)
* Improve performance of rolling back write transactions after making changes. If no notifications events are subscribed to, this is now constant time rather than taking time proportional to the number of changes to be rolled back. Rollbacks when there are notifications subscriptions are 10-20% faster. (Core 13.9.4)
* PBS to FLX Migration for migrating a client app that uses partition based sync to use flexible sync under the hood if the server has been migrated to flexible sync. (Core 13.10.0)

### Fixed
* Fixed an issue that could cause a `The specified table name is already in use` exception when creating a new Realm file on multiple threads. (Issue [#3302](https://github.com/realm/realm-dotnet/issues/3302))
* Fixed a bug that may have resulted in arrays being in different orders on different devices. Some cases of “Invalid prior_size” may be fixed too. (Core 13.7.1)
* Fixed a crash when querying a `RealmValue` property with a string operator (contains/like/beginswith/endswith) or with case insensitivity. (Core 13.8.0)
* Querying for equality of a string on an indexed `RealmValue` property was returning case insensitive matches. For example querying for `myIndexedValue == "Foo"` would incorrectly match on values of "foo" or "FOO" etc. (Core 13.8.0)
* Adding an index to a `RealmValue` property on a non-empty table would crash with an assertion. (Core 13.8.0)
* `SyncSession.Stop()` could hold a reference to the database open after shutting down the sync session, preventing users from being able to delete the realm. (Core 13.8.0)
* Fix a stack overflow crash when using the query parser with long chains of AND/OR conditions. (Core 13.9.0)
* `ClientResetException.InitiateClientReset()` no longer ignores the result of trying to remove a realm. This could have resulted in a client reset action being reported as successful when it actually failed on windows if the `Realm` was still open. (Core 13.9.0)
* Fix a data race where if one thread committed a write transaction which increased the number of live versions above the previous highest seen during the current session at the same time as another thread began a read, the reading thread could read from a no-longer-valid memory mapping (Core 13.9.0).
* Performing a query like `{1, 2, 3, ...} IN list` where the array is longer than 8 and all elements are smaller than some values in list, the program would crash (Core 13.9.4)
* Performing a large number of queries without ever performing a write resulted in steadily increasing memory usage, some of which was never fully freed due to an unbounded cache (Core 13.9.4)

### Compatibility
* Realm Studio: 13.0.0 or later.

### Internal
* Using Core 13.10.0.