Skip to content

Commit d01c954

Browse files
authored
(DOCSP-12426): Build out Realm Studio documentation (#1053)
1 parent 118b7c4 commit d01c954

20 files changed

+794
-52
lines changed

snooty.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ toc_landing_pages = [
4141
"/node",
4242
"/react-native",
4343
"/web",
44-
"/dotnet"
44+
"/dotnet",
45+
"/studio"
4546
]
4647

4748
[substitutions]
Loading
Loading
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. code-block:: csharp
2+
3+
var realm = Realm.GetInstance();
4+
Console.WriteLine($"Realm is located at: {realm.Config.DatabasePath}");
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
The filesystem used by Android emulators is not directly accessible
2+
from the machine running Realm Studio. You must download the file
3+
from the emulator before you can access it.
4+
5+
First, find the path of the file on the emulator:
6+
7+
.. code-block:: java
8+
9+
// Run this on the device to find the path on the emulator
10+
Realm realm = Realm.getDefaultInstance();
11+
Log.i("Realm", realm.getPath());
12+
13+
Then, download the file using ADB. You can do this while the app
14+
is running.
15+
16+
.. code-block:: java
17+
18+
> adb pull <path>
19+
20+
You can also upload the modified file again using ADB, but only
21+
when the app isn't running. Uploading a modified file while the
22+
app is running can corrupt the file.
23+
24+
.. code-block:: java
25+
26+
> adb push <file> <path>
27+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. code-block:: javascript
2+
3+
// Get on-disk location of the default Realm
4+
Realm.open({}).then(realm => {
5+
console.log("Realm is located at: " + realm.path);
6+
});
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. code-block:: swift
2+
3+
// Get on-disk location of the default Realm
4+
let realm = try! Realm()
5+
print("Realm is located at:", realm.configuration.fileURL!)
6+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
To export updated class definitions:
2+
3+
- Go to :guilabel:`File` > :guilabel:`Save model definitions`, and select
4+
your preferred language. Supported languages include: Swift, JavaScript,
5+
TypeScript, Java, Kotlin, and C#.
6+
- Specify a name and destination for your new class definitions. Press
7+
the :guilabel:`Save` button.
8+
9+
If your destination directory does not already exist, Realm Studio creates
10+
it. Inside, you'll find a file that contains a complete list of classes
11+
and properties, including new additions.

source/includes/realm-studio.rst

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)