Skip to content

Commit 61a1d4f

Browse files
author
Michael Wilkerson-Barker
committed
Updates prior to releasing SDK to customer
1 parent baa685d commit 61a1d4f

4 files changed

Lines changed: 60 additions & 5 deletions

File tree

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,42 @@
11
# test-app-flutter
22
Refactored Flutter Template App that allows for switching between the cloud and edge servers.
3+
4+
## How to set up
5+
6+
1. Download this repo to a local directory
7+
2. Download and extract the contents of the flutter "update base URL" SDK archive into a
8+
`flutter-update-baseurl` directory under the same parent directory where this repo is stored.
9+
3. Open the pubspec.yaml file and verify the realm dependency path points to your directory where
10+
the SDK was extracted:
11+
12+
```
13+
realm:
14+
path: ../flutter-update-baseurl/realm
15+
```
16+
17+
4. Start up the edge server using the instructions online and the provided `config.json` file in
18+
the _edge/_ directory. This points to a demo Realm app that can be used with this demo app.
19+
20+
**IMPORTANT:** Only one Edge Server instance can be running at a time with the provided `config.json`
21+
file.
22+
23+
5. Update the `edgeServer` constant in _lib/realm/realm\_services.dart_ file to point to the
24+
hostname or ip address of the edge server started in step 4.
25+
6. Update the flutter app dependencies by running `flutter pub get` from the top level
26+
_test-app-flutter/_ directory.
27+
28+
## Running the Demo App
29+
30+
1. Start the flutter app by running `flutter run`.
31+
2. Log in using a new user or the default user credentials:
32+
33+
> username: `testuser4@test.com`
34+
35+
> password: `testpass`
36+
37+
3. The "cloud" button in the App Bar will switch between the cloud (filled) or edge (circle)
38+
servers and the list will be updated with the contents from that server. The confirmation
39+
of the server used will be printed on the command line.
40+
4. Verify everything is working properly by using the offline/online (Wifi) button in the
41+
App Bar or using the "Show All Tasks" switch. The command line will show information
42+
about when either of these items is selected or changed.

edge/config.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"clientAppId": "devicesync-bmqjg",
3+
"query": "*",
4+
"cloudSyncServerAuthSecret": "964d3b768c1e16b6a74463191ec6b1b8",
5+
"hostname": "localhost",
6+
"tls" : {
7+
"enabled": false,
8+
"certificates": [
9+
{
10+
"publicKeyPath": "certs/cert.pem",
11+
"privateKeyPath": "certs/certkey.pem"
12+
}
13+
]
14+
}
15+
}

pubspec.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,21 +499,21 @@ packages:
499499
realm:
500500
dependency: "direct main"
501501
description:
502-
path: "/Users/michael.wilkersonbarker/Dev/realm-dart-lib/release-bundle-1/realm"
503-
relative: false
502+
path: "../flutter-update-baseurl/realm"
503+
relative: true
504504
source: path
505505
version: "1.6.1-aa08922819602035b653c72d5cf5b26d42881fee"
506506
realm_common:
507507
dependency: transitive
508508
description:
509-
path: "../realm-dart-lib/release-bundle-1/common"
509+
path: "../flutter-update-baseurl/common"
510510
relative: true
511511
source: path
512512
version: "1.6.1-aa08922819602035b653c72d5cf5b26d42881fee"
513513
realm_generator:
514514
dependency: transitive
515515
description:
516-
path: "../realm-dart-lib/release-bundle-1/generator"
516+
path: "../flutter-update-baseurl/generator"
517517
relative: true
518518
source: path
519519
version: "1.6.1-aa08922819602035b653c72d5cf5b26d42881fee"

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
provider: ^6.0.0
1616
# realm: ^1.4.0
1717
realm:
18-
path: ../realm-dart-lib/release-bundle-1/realm
18+
path: ../flutter-update-baseurl/realm
1919
path_provider: ^2.0.10
2020
url_launcher: ^6.1.12
2121

0 commit comments

Comments
 (0)