Skip to content

chore: add clearAll button, iOS run script, and simplify build guide#1124

Merged
fadi-george merged 4 commits intomainfrom
fg/clear-all
Mar 10, 2026
Merged

chore: add clearAll button, iOS run script, and simplify build guide#1124
fadi-george merged 4 commits intomainfrom
fg/clear-all

Conversation

@fadi-george
Copy link
Copy Markdown
Collaborator

@fadi-george fadi-george commented Mar 10, 2026

Description

One Line Summary

Add a Clear All notifications button to the demo app, an iOS simulator run script, and simplify the build guide to reference the shared sdk-shared docs.

Details

Motivation

The demo app was missing a way to clear all delivered notifications. A helper script for iOS simulator selection was also needed to match the existing Android one. The build guide was duplicating content that now lives in the shared sdk-shared/demo/build.md.

Scope

Demo app changes

  • onesignal_repository.dart adds clearAllNotifications() calling OneSignal.Notifications.clearAll()
  • app_viewmodel.dart adds clearAllNotifications() with log and snackbar feedback
  • send_push_section.dart adds a CLEAR ALL button (outlined/destructive style)

iOS run script

  • examples/run-ios.sh lists booted iOS simulators and lets you pick one, then runs flutter run -d <udid>
  • examples/demo/README.md updated to reference the new script

Build guide

  • examples/build.md now references the shared sdk-shared/demo/build.md and only contains Flutter-specific overrides

Testing

Manual testing

Ran the demo app on Android emulator. Verified the CLEAR ALL button clears delivered notifications. Tested run-ios.sh with a booted iOS simulator.

Screenshot 2026-03-09 at 6 11 03 PM Screenshot 2026-03-09 at 6 14 10 PM

Affected code checklist

  • Notifications
    • Display
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

Made with Cursor


This change is Reviewable

@fadi-george fadi-george requested a review from a team as a code owner March 10, 2026 01:15
@fadi-george fadi-george merged commit b0c26ae into main Mar 10, 2026
5 checks passed
@fadi-george fadi-george deleted the fg/clear-all branch March 10, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants