Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/client-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@
"prettier": "^3.5.3",
"vite": "^5.4.19",
"vitest": "^3.1.1"
},
"engines": {
"node": "22.17.0"
}
}
55 changes: 18 additions & 37 deletions examples/expo-example/README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,31 @@
# Welcome to your Expo app 👋
# Knock + Expo example app

This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).
This example app uses [Knock](https://knock.app) to power in-app notifications. It uses the [Knock Expo SDK](../../packages/expo) and [Expo](https://docs.expo.dev/).

## Get started
> Not using Expo? See our [Knock + React Native example app](../react-native-example/README.md).

1. Install dependencies
## Running locally

```bash
npm install
```
1. Install dependencies from the root of the monorepo.

2. Start the app

```bash
npx expo start
```

In the output, you'll find options to open the app in a

- [development build](https://docs.expo.dev/develop/development-builds/introduction/)
- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo

You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).

## Get a fresh project

When you're ready, run:

```bash
npm run reset-project
```sh
yarn
```

This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.
2. Make sure the packages have been built by running `yarn build:packages`

## Learn more
3. Configure the environment variables. Copy `.env.sample` to `.env.development.local` and add the relevant API keys and channel id from your Knock dashboard.

To learn more about developing your project with Expo, look at the following resources:
4. Set up your development environment to run native apps depending on your operating system and the platform you'd like to run the example on. See the [Expo docs](https://docs.expo.dev/guides/local-app-development/) for more information.

- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
5. Run the example app. Optionally, specify which platform you'd like to run on

## Join the community
```sh
yarn start

Join our community of developers creating universal apps.
# Or run the app on iOS
yarn ios

- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.
# Or run the app on Android
yarn android
```
4 changes: 2 additions & 2 deletions examples/expo-example/app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"expo": {
"name": "expo-example",
"slug": "expo-example",
"name": "@knocklabs/expo-example",
"slug": "@knocklabs/expo-example",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
Expand Down
5 changes: 4 additions & 1 deletion examples/expo-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,8 @@
"eslint-plugin-prettier": "^5.5.1",
"typescript": "^5.8.3"
},
"private": true
"private": true,
"engines": {
"node": "22.17.0"
}
}
3 changes: 3 additions & 0 deletions examples/guide-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
"typescript": "^5.8.3",
"typescript-eslint": "^8.31.0",
"vite": "^5.4.19"
},
"engines": {
"node": "22.17.0"
}
}
3 changes: 3 additions & 0 deletions examples/ms-teams-connect-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
"eslint": "^8.56.0",
"eslint-config-next": "15.3.5",
"typescript": "^5.8.3"
},
"engines": {
"node": "22.17.0"
}
}
3 changes: 3 additions & 0 deletions examples/nextjs-app-dir-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@
"eslint": "^8.56.0",
"eslint-config-next": "15.3.5",
"typescript": "^5.8.3"
},
"engines": {
"node": "22.17.0"
}
}
3 changes: 3 additions & 0 deletions examples/nextjs-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@
"@types/uuid": "^10.0.0",
"eslint": "^8.56.0",
"typescript": "^5.8.3"
},
"engines": {
"node": "22.17.0"
}
}
2 changes: 0 additions & 2 deletions examples/react-native-example/.bundle/config

This file was deleted.

6 changes: 0 additions & 6 deletions examples/react-native-example/.env.sample

This file was deleted.

75 changes: 0 additions & 75 deletions examples/react-native-example/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion examples/react-native-example/.watchmanconfig

This file was deleted.

74 changes: 0 additions & 74 deletions examples/react-native-example/App.tsx

This file was deleted.

Loading