Skip to content

Commit

Permalink
Add instructions to run capacitor app
Browse files Browse the repository at this point in the history
  • Loading branch information
tung2744 committed Jan 17, 2024
1 parent c835eff commit c23f468
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
35 changes: 35 additions & 0 deletions example/capacitor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Ionic Capacitor Example App

Example app of ionic app using capacitor.

## Project config

We need the following redirect uris to work:

```
http://localhost:8100/reauth-redirect
http://localhost:8100/oauth-redirect
com.authgear.exampleapp.capacitor://host/path
https://localhost
capacitor://localhost
```

## Run the app

Before running the app, build the latest sdk at project root.

```sh
npm i
npm run build
```

Then, in this directory, run the exmaple app.

```sh
cd example/capacitor
npm i
# Run it in ios device
npm run run-ios
# OR, run it in android device
npm run run-android
```
4 changes: 3 additions & 1 deletion example/capacitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"build": "tsc && vite build",
"preview": "vite preview",
"test.unit": "vitest",
"lint": "eslint"
"lint": "eslint",
"run-ios": "cap run ios",
"run-android": "cap run android"
},
"dependencies": {
"@authgear/capacitor": "../../packages/authgear-capacitor",
Expand Down

0 comments on commit c23f468

Please sign in to comment.