Skip to content

Commit 62f94d0

Browse files
Add platform setup instructions
1 parent 56697a9 commit 62f94d0

File tree

10 files changed

+38
-8
lines changed

10 files changed

+38
-8
lines changed

README.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,49 @@
1616

1717
OneSignal makes engaging customers simple and is the fastest, most reliable service to send push notifications, in-app messages, SMS, and emails.
1818

19-
This project demonstrates how to send a push notification from a [Supabase Edge Function](https://supabase.com/docs/guides/functions). Use this sample integration as a reference for your own edge function implementation.
19+
![App demo](/assets/aux/push-notification-demo.gif)
20+
21+
This project demonstrates how to use OneSignal as an integration with [Supabase](https://supabase.com) to handle your messaging needs, including push notifications, SMS text messages, email, and in-app messaging. Feel free to use this sample as a reference for your own Supabase integration.
22+
23+
###### Current OneSignal channels Implemented
24+
25+
- [x] Mobile Push Notifications
26+
- [ ] Web Push Notifications (planned)
27+
- [ ] SMS Text Messages (planned)
28+
- [ ] Email (planed)
29+
- [x] In-app Messages
30+
31+
---
2032

2133
## 🚦 Getting started
2234

2335
This project assumes that you already have a few things setup.
2436

25-
- [OneSignal app](https://documentation.onesignal.com/docs/apps-organizations#create-an-app) created.
26-
- [Android](https://documentation.onesignal.com/docs/android-sdk-setup) or [iOS](https://documentation.onesignal.com/docs/ios-sdk-setup) app integrated with a [OneSignal SDK](https://github.com/onesignal/sdks).
27-
- [Supabase CLI](https://supabase.com/docs/guides/cli#installation) [v1.14.0](https://www.npmjs.com/package/supabase/v/1.14.0) installed.
37+
- An existing OneSignal account. If not, [create one for free](https://dashboard.onesignal.com/signup).
38+
- A Supabase account and the [Supabase CLI](https://supabase.com/docs/guides/cli#installation) [v1.16.0](https://www.npmjs.com/package/supabase/v/1.16.0) installed.
39+
- A Firebase account, if not [create one first](https://firebase.google.com/).
40+
- A Stripe account and the [Stripe CLI](https://stripe.com/docs/stripe-cli) v1.13.5 installed.
41+
- A Vercel account and the [Vercel CLI](https://vercel.com/docs/cli#) [v28.7.0](https://www.npmjs.com/package/vercel/v/28.7.0) installed (or anything capable of hosting a Next.js API).
42+
- A working Flutter dev environment and access to a mac for iOS-specific steps.
2843
- [Deno](https://github.com/denoland/deno_install) v1.28.0 installed.
2944

30-
---
31-
3245
## Setup OneSignal App
3346

47+
1. From the OneSignal Dashboard, select **New App/Website** to create an app.
48+
![Select New App/Website to create new app](assets/configure-android/01-create-new-app.png)
49+
2. Name app and choose the **Android** platform to setup. ![Onesignal platform configuration](assets/configure-android/02-configure-android.png)
50+
3. Enter FCM credentials for the Firebase project you want to handle Android notifications and choose **Save & Continue**. ![FCM configuration form](assets/configure-android/03-save-fcm-details.png)
51+
3452
### Setup iOS Platform
3553

36-
### Setup Android Platform
54+
iOS configuration requires substantially more effort to integrate due to needing signed certs from Apple. Due to this fact, follow [this guide](https://github.com/OneSignalDevelopers/OneSignal-Flutter-Sample/blob/main/docs/obtaining-ios-push-cert.md) for detailed instructions on creating the certificate needed to use Apple's Push Notification Service ([APNs](https://developer.apple.com/documentation/usernotifications/registering_your_app_with_apns)).
55+
56+
After you have the certificate, head to the OneSignal Dashboard
57+
58+
1. Choose **Settings -> Platforms**
59+
2. **Activate** the iOS card
60+
![Platform settings](assets/configure-ios/01-activate-apple-platform.png)
61+
3. Upload your certificate and enter the password you used to encrypt it. If you didn't set a password, leave the password input blank. ![Apple iOS (APNs) Configuration form](assets/configure-ios/02-apns-configuration.png)
3762

3863
### Craft an In-App Message
3964

2.22 MB
Loading
816 KB
Loading
1.69 MB
Loading
1.44 MB
Loading
1.71 MB
Loading
1.87 MB
Loading
1.43 MB
Loading

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

supabase/functions/_utils/config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import * as OneSignal from "https://esm.sh/@onesignal/node-onesignal@1.0.
55
export const _OnesignalAppId_ = Deno.env.get("ONESIGNAL_APP_ID")!
66
const _OnesignalUserAuthKey_ = Deno.env.get("USER_AUTH_KEY")!
77
export const _OnesignalRestApiKey_ = Deno.env.get("ONESIGNAL_REST_API_KEY")!
8-
98
const configuration = OneSignal.createConfiguration({
109
userKey: _OnesignalUserAuthKey_,
1110
appKey: _OnesignalAppId_,

0 commit comments

Comments
 (0)