Skip to content

Commit 85711ae

Browse files
committed
Update compatibility with note on source generator model requirements
1 parent 7da5060 commit 85711ae

File tree

1 file changed

+58
-27
lines changed

1 file changed

+58
-27
lines changed

source/sdk/dotnet/compatibility.txt

Lines changed: 58 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,43 @@ Platform and Framework Compatibility - .NET SDK
1111
:depth: 2
1212
:class: singlecol
1313

14+
.. meta::
15+
:description: Compatibility information for Atlas Device SDK for .NET.
16+
17+
.. facet::
18+
:name: genre
19+
:values: reference
20+
1421
Compatibility
1522
-------------
1623

1724
The following table shows which .NET
1825
version(s) you can use with Realm on your target platforms:
1926

27+
.. note::
28+
29+
The source generator models in .NET SDK v10.18.0 and later
30+
require the following:
31+
32+
- .NET Core 2.0 or later (.NET Framework 5.0 or later)
33+
- C# 9.0 or later
34+
35+
If you are targeting an older version of .NET Framework, your object
36+
models must derive from
37+
:dotnet-sdk:`RealmObject <reference/Realms.RealmObject.html>`,
38+
:dotnet-sdk:`EmbeddedObject <reference/Realms.EmbeddedObject.html>`, or
39+
:dotnet-sdk:`AsymmetricObject <reference/Realms.AsymmetricObject.html>`
40+
base classes.
41+
42+
The following example demonstrates how you can adjust your current object
43+
models:
44+
45+
.. code-block:: csharp
46+
47+
public partial class Person : IRealmObject
48+
49+
public class Person : RealmObject // Update to inherit from RealmObject
50+
2051
.. list-table::
2152
:header-rows: 1
2253
:widths: 50 50
@@ -32,38 +63,38 @@ version(s) you can use with Realm on your target platforms:
3263
* - Windows 8.1 or later
3364
- | .NET Core 2.0 or later (.NET 5.0 Framework or later)
3465
| .NET Framework 4.6.1 or later
35-
| MAUI requires Windows 11 and Windows 10 version 1809 or higher, using
66+
| MAUI requires Windows 11 and Windows 10 version 1809 or higher, using
3667
Windows UI Library (WinUI) 3.
3768

3869
* - Universal Windows Platform (UWP)
3970
- .NET Standard 2.0 or later (Fall Creators Update)
4071

4172
* - macOS
4273
- | .NET Core 2.0 or later (.NET 5.0 Framework or later)
43-
| Xamarin.Mac for macOS 10.11 or later.
74+
| Xamarin.Mac for macOS 10.11 or later.
4475
| MAUI requires macOS 10.15 or later, using Mac Catalyst.
4576

4677
* - iOS
47-
- | Xamarin.iOS for iOS 9 or later.
78+
- | Xamarin.iOS for iOS 9 or later.
4879
| MAUI requires iOS 11 or later.
4980

5081
* - Android
51-
- | Xamarin.Android for Android 4.1 (API level 16) or later.
82+
- | Xamarin.Android for Android 4.1 (API level 16) or later.
5283
| MAUI requires Android 5.0 (API level 21) or later.
53-
84+
5485
* - tvOS
55-
- | Xamarin and Unity for tvOS 9.0 or later.
86+
- | Xamarin and Unity for tvOS 9.0 or later.
5687
| For more information on developing for tvOS, see :ref:`<ios-tvos>`.
5788

5889
Development Environments
5990
------------------------
6091

61-
You can use the following development environments to build Realm apps with
92+
You can use the following development environments to build Realm apps with
6293
the .NET SDK:
6394

6495
- Visual Studio 2015 Update 2 or higher for Windows
6596
- Visual Studio for Mac 7.0 or higher
66-
- Unity `2020.3.12f1 (LTS) <https://unity3d.com/get-unity/download/archive>`__
97+
- Unity `2020.3.12f1 (LTS) <https://unity3d.com/get-unity/download/archive>`__
6798

6899
.. note::
69100

@@ -73,39 +104,39 @@ the .NET SDK:
73104
this version to ensure your project works with Realm and that
74105
the install steps match the :doc:`Integrate Realm with Unity
75106
</sdk/dotnet/unity>` documentation steps because Unity's UI
76-
often changes between versions.
107+
often changes between versions.
77108

78109

79110
Android Deployment
80111
------------------
81-
Due to some instruction set limitations, Realm does not support
82-
deploying Android apps to the ``armeabi`` ABI. Because default templates often
83-
have different ABI settings for Debug and Release modes, your app may throw
84-
a ``System.TypeInitializationException`` exception in Release mode but not when
112+
Due to some instruction set limitations, Realm does not support
113+
deploying Android apps to the ``armeabi`` ABI. Because default templates often
114+
have different ABI settings for Debug and Release modes, your app may throw
115+
a ``System.TypeInitializationException`` exception in Release mode but not when
85116
it was running in Debug mode.
86117

87-
To avoid this, verify the ABI settings for both Debug and Release modes. To check
88-
and change the settings, follow the steps in the
89-
`Visual Studio CPU Architectures <https://docs.microsoft.com/en-us/xamarin/android/app-fundamentals/cpu-architectures>`_
118+
To avoid this, verify the ABI settings for both Debug and Release modes. To check
119+
and change the settings, follow the steps in the
120+
`Visual Studio CPU Architectures <https://docs.microsoft.com/en-us/xamarin/android/app-fundamentals/cpu-architectures>`_
90121
page.
91122

92-
Unless you have a good reason to avoid linking other ABIs, we recommend
123+
Unless you have a good reason to avoid linking other ABIs, we recommend
93124
checking all of the settings other than ``armeabi``.
94125

95-
Limitations
126+
Limitations
96127
------------
97-
Realm has limits imposed to balance flexibility with performance. The SDK
98-
throws an exception during app initialization if the following limits are
128+
Realm has limits imposed to balance flexibility with performance. The SDK
129+
throws an exception during app initialization if the following limits are
99130
exceeded:
100131

101-
- Class names can't exceed 57 bytes in length.
102-
- Property names can't exceed 63 bytes in length.
132+
- Class names can't exceed 57 bytes in length.
133+
- Property names can't exceed 63 bytes in length.
103134

104-
In addition, for iOS apps, the total size of all open Realm files cannot be
105-
larger than the amount of memory your application is allowed to map in iOS. This
106-
varies per device, and depends on how fragmented the memory space on the device is.
107-
If you need to store more data than is allowed, you can split your data into
108-
multiple Realm files, open a realm only when needed, and close it when it is
135+
In addition, for iOS apps, the total size of all open Realm files cannot be
136+
larger than the amount of memory your application is allowed to map in iOS. This
137+
varies per device, and depends on how fragmented the memory space on the device is.
138+
If you need to store more data than is allowed, you can split your data into
139+
multiple Realm files, open a realm only when needed, and close it when it is
109140
no longer needed.
110141

111142
For more information, see `Open Radar 17119975 <http://www.openradar.me/17119975>`_.

0 commit comments

Comments
 (0)