Skip to content

FAQ: How do I test push notifications locally? #453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
1 change: 0 additions & 1 deletion docs/ff-concepts/adding-customization/custom-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,5 @@ function code. Instead, you can pass the app state variable as a parameter and t

</details>


## Utility Functions Library
Instead of building everything from scratch, explore our **[Utility Functions Library](https://marketplace.flutterflow.io/item/ZVBmWMGpXe6vqnASRHDA)** — packed with 50+ helpful functions for everyday tasks like formatting text, manipulating dates, validating input, and more. Easily plug them into your custom logic to save time and reduce errors.
38 changes: 37 additions & 1 deletion docs/ff-concepts/notifications/push-notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,4 +282,40 @@ Also, ensure that these principals (emails) and their roles are present in the p

Below is a sample image for App Engine Default service account.
![pn-faq-img-2](imgs/pn-faq-img-2.png)
</details>
</details>

<details>
<summary>How do I test push notifications locally in FlutterFlow?</summary>

Push notifications cannot be fully tested in a browser or most emulators — they require a real device with proper push notification service configuration.

**To Test lLcally:**

1. **Use a Physical Device**
- Connect an Android or iOS device via USB or Wi-Fi.
- Notifications do not work reliably in Flutter web builds or most simulators.

2. **Set Up Your Push Notification Service**
- **For Firebase Cloud Messaging (FCM):**
- Add your Android package name and/or iOS bundle ID in Firebase Console.
- Download `google-services.json` (Android) or `GoogleService-Info.plist` (iOS) and add it to your project.
- **For OneSignal:**
- Create an app in OneSignal Dashboard.
- Configure the app ID and platform keys in FlutterFlow.

3. **Run the App Locally**
- Use FlutterFlow **Run Mode** or `flutter run` after exporting code.
- Ensure push notification permissions are requested on launch.

4. **Send a Test Notification**
- **Firebase Console:** Go to **Cloud Messaging****Send message** → target your device.
- **OneSignal Dashboard:** Go to **Messages****New Push**.

5. **Grant Notification Permissions on Device**
- iOS will prompt the first time; make sure to allow.
- Android 13+ will also prompt for permission.

:::tip
Keep your device connected and reuse the same build for repeated tests to avoid re-granting permissions each time.
:::
</details>