Skip to content

Commit e06b910

Browse files
Add standalone Expo example (#5)
* Add standalone Expo example * Label Expo example screen * Include Expo example in typecheck * Typecheck Expo example in CI
1 parent 3e29af4 commit e06b910

12 files changed

Lines changed: 7887 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,15 @@ jobs:
2626
- name: Lint files
2727
run: yarn lint
2828

29+
- name: Install Expo example dependencies
30+
run: npm --prefix examples/expo-example ci
31+
2932
- name: Typecheck files
3033
run: yarn typecheck
3134

35+
- name: Typecheck Expo example
36+
run: npm --prefix examples/expo-example run typecheck
37+
3238

3339
build-library:
3440
runs-on: ubuntu-latest

.github/workflows/quick-checks.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,11 @@ jobs:
2727
- name: Lint files
2828
run: yarn lint
2929

30+
- name: Install Expo example dependencies
31+
run: npm --prefix examples/expo-example ci
32+
3033
- name: Typecheck files
3134
run: yarn typecheck
35+
36+
- name: Typecheck Expo example
37+
run: npm --prefix examples/expo-example run typecheck

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,16 @@ on the underlying native SDKs.
154154
- OIDC redirect auth requires the consuming app to configure its own URL scheme
155155
or app links.
156156

157+
## Examples
158+
159+
- `examples/sdk-example` is the bare React Native SDK demo.
160+
- `examples/trails-actions-example` is the bare React Native demo for OMS wallet
161+
flow with Trails action resolution.
162+
- `examples/expo-example` is a standalone Expo development-build demo that uses
163+
`expo-web-browser` and the published npm package. It is intentionally
164+
excluded from the root Yarn workspace so it is not linked to the local SDK
165+
source.
166+
157167
## License
158168

159169
MIT

examples/expo-example/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.expo/
2+
android/
3+
ios/
4+
node_modules/
5+
npm-debug.log

examples/expo-example/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# OMS Expo Example
2+
3+
Expo development-build example for `@0xsequence/oms-react-native-sdk`.
4+
5+
This app mirrors the SDK demo flow with email login, Google redirect login,
6+
wallet selection, message signing, signature verification, and transaction
7+
sending. It uses `expo-web-browser` for redirect auth and depends on the
8+
published npm package:
9+
10+
```json
11+
"@0xsequence/oms-react-native-sdk": "0.1.0-alpha.1"
12+
```
13+
14+
This example is intentionally excluded from the root Yarn workspace. It is not
15+
linked to the local SDK package, which keeps it useful as a consumer-style smoke
16+
test for the published npm artifact.
17+
18+
## Run
19+
20+
Install dependencies from this folder:
21+
22+
```sh
23+
npm install
24+
```
25+
26+
Build and launch a development build:
27+
28+
```sh
29+
npm run ios
30+
npm run android
31+
```
32+
33+
Start Metro for an already-installed development build:
34+
35+
```sh
36+
npm start
37+
```
38+
39+
Native configuration is set through `app.json`. The generated `ios/` and
40+
`android/` folders are intentionally ignored.

examples/expo-example/app.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"expo": {
3+
"name": "OMS Expo Example",
4+
"slug": "oms-expo-example",
5+
"version": "1.0.0",
6+
"scheme": "omsclientrndemo",
7+
"orientation": "portrait",
8+
"newArchEnabled": true,
9+
"ios": {
10+
"supportsTablet": true,
11+
"bundleIdentifier": "com.sequence.oms.expoexample"
12+
},
13+
"android": {
14+
"package": "com.sequence.oms.expoexample"
15+
},
16+
"plugins": [
17+
"expo-web-browser",
18+
[
19+
"expo-build-properties",
20+
{
21+
"android": {
22+
"minSdkVersion": 26
23+
}
24+
}
25+
]
26+
]
27+
}
28+
}

examples/expo-example/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { registerRootComponent } from 'expo';
2+
3+
import App from './src/App';
4+
5+
registerRootComponent(App);

0 commit comments

Comments
 (0)