Skip to content

Commit b1c0e6e

Browse files
committed
Updated readme entry for Maui demo.
1 parent 0813194 commit b1c0e6e

File tree

2 files changed

+49
-2
lines changed

2 files changed

+49
-2
lines changed

demos/MAUITodo/Data/NodeConnector.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ namespace MAUITodo.Data;
1313

1414
public class NodeConnector : IPowerSyncBackendConnector
1515
{
16-
private static readonly string StorageFilePath = "user_id.txt"; // Simulating local storage
16+
private string StorageFilePath => Path.Combine(FileSystem.AppDataDirectory, "user_id.txt");
17+
1718
private readonly HttpClient _httpClient;
1819

1920
public string BackendUrl { get; }

demos/MAUITodo/README.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# .NET MAUI ToDo List Demo App
22

3-
## To test (we currently recommend testing on iOS):
3+
## Quickstart for testing (we currently recommend testing on iOS):
44
1. You need to have one of our Node.js self-host demos ([Postgres](https://github.com/powersync-ja/self-host-demo/tree/main/demos/nodejs) | [MongoDB](https://github.com/powersync-ja/self-host-demo/tree/main/demos/nodejs-mongodb) | [MySQL](https://github.com/powersync-ja/self-host-demo/tree/main/demos/nodejs-mysql)) running, as it provides the PowerSync server that this demo's SDK connects to.
55
2. In the root directly run:
66
1. `dotnet run --project Tools/Setup`
@@ -10,3 +10,49 @@
1010
1. Or specify an iOS simulator identifier e.g.: `dotnet build -t:Run -f:net8.0-ios -p:_DeviceName=:v2:udid=B1CA156A-56FC-4C3C-B35D-4BC349111FDF`
1111
5. Changes made to the backend's source DB (inspect via a tool like `psql`) or to the self-hosted aapp's web UI will be synced to this iOS client (and vice versa)
1212

13+
14+
## Getting Started
15+
16+
In the repo root, run the following to download the PowerSync extension:
17+
18+
```bash
19+
dotnet run --project Tools/Setup
20+
```
21+
22+
Then switch into the demo's directory:
23+
24+
Install dependencies:
25+
26+
```bash
27+
dotnet restore
28+
```
29+
30+
## Running the App
31+
32+
### iOS
33+
34+
```sh
35+
dotnet build -t:Run -f:net8.0-ios
36+
```
37+
38+
Specifyng an iOS simulator
39+
```sh
40+
dotnet build -t:Run -f:net8.0-ios -p:_DeviceName=:v2:udid=B1CA156A-56FC-4C3C-B35D-4BC349111FDF
41+
```
42+
43+
### Android
44+
45+
```sh
46+
dotnet build -t:Run -f:net8.0-android
47+
```
48+
49+
Specifying an Android emulator
50+
```sh
51+
dotnet build -t:Run -f:net8.0-android -p:_DeviceName=emulator-5554
52+
```
53+
54+
### Windows
55+
56+
```sh
57+
dotnet build -t:Run -f net8.0-windows10.0.19041.0
58+
```

0 commit comments

Comments
 (0)