OneSignal makes engaging customers simple and is the fastest, most reliable service to send push notifications, in-app messages, SMS, and emails.
This repo contains the companion app to the Onesignal + Supabase Sample Integration guide.
- Run
cp .env.example .env.local
to duplicate the environment file template and set their values based on what you setup in the integration guide. - If you're building for iOS, update the app's bundle and group IDs with the identifier you setup in Apple Developer Network
Your project diff should look similar to this 👇 after the changes.
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 2864eb6..62cf60e 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -494,7 +494,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = "com.onesignal.devrel.supabase-sample-integration";
+ PRODUCT_BUNDLE_IDENTIFIER = your.bundle.id;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@@ -738,7 +738,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = "com.onesignal.devrel.supabase-sample-integration";
+ PRODUCT_BUNDLE_IDENTIFIER = your.bundle.id;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -765,7 +765,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = "com.onesignal.devrel.supabase-sample-integration";
+ PRODUCT_BUNDLE_IDENTIFIER = your.bundle.id;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
diff --git a/ios/Runner/Runner.entitlements b/ios/Runner/Runner.entitlements
index ad08247..903def2 100644
--- a/ios/Runner/Runner.entitlements
+++ b/ios/Runner/Runner.entitlements
@@ -4,9 +4,5 @@
<dict>
<key>aps-environment</key>
<string>development</string>
+ <key>com.apple.security.application-groups</key>
+ <array>
+ <string>group.your.app.group</string>
+ </array>
</dict>
</plist>
- Run
flutter start
to launch the app on your iOS device or emulator (iOS Simulator doesn't support push notifications).
Todo: graphic
The EUID is when the user signs up or logs in.
Prompt user for notification consent upon completing purchase with an in-app message.
For additional resources, please join the OneSignal Developer Community.
Get in touch with us or learn more about OneSignal through the channels below.
- Follow us on Twitter to never miss any updates from the OneSignal team, ecosystem & community
- Join us on Discord to be a part of the OneSignal Developers community, showcase your work and connect with other OneSignal developers
- Read the OneSignal Blog for the latest announcements, tutorials, in-depth articles & more.
- Subscribe to us on YouTube for walkthroughs, courses, talks, workshops & more.
- Follow us on Twitch for live streams, office hours, support & more.
Give a ⭐️ if this project helped you, and watch this repo to stay up to date.