From 7e6ac13852c7ad2da1267c9cb1f106ccb9b49385 Mon Sep 17 00:00:00 2001 From: Rafael Setragni Date: Thu, 18 Jan 2024 09:40:48 -0300 Subject: [PATCH 1/2] Complete cancelSchedule Implementation on iOS and Update Example App - Finalized the cancelSchedule feature implementation for iOS platforms, enabling scheduled notifications to be canceled as expected. - Updated the example app to include this newly tested feature, demonstrating its usage and ensuring it functions correctly across various scenarios. - Conducted comprehensive testing to confirm that the cancelSchedule behaves consistently and reliably on iOS devices. - This update enhances the feature set of the app on iOS, aligning it with capabilities offered on other platforms. --- example/lib/pages/home_page.dart | 5 +++++ ios/Classes/lib/SwiftAwesomeNotificationsPlugin.swift | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/example/lib/pages/home_page.dart b/example/lib/pages/home_page.dart index 86d9cfe5..c82e0b95 100644 --- a/example/lib/pages/home_page.dart +++ b/example/lib/pages/home_page.dart @@ -1043,6 +1043,11 @@ class _HomePageState extends State { onPressed: () => NotificationUtils.dismissNotificationsByGroupKey( 'grouped')), + SimpleButton('Cancel schedule by id', + backgroundColor: Colors.red, + labelColor: Colors.white, + onPressed: () => + NotificationUtils.cancelSchedule(1)), SimpleButton('Cancel all schedules by channel key', backgroundColor: Colors.red, labelColor: Colors.white, diff --git a/ios/Classes/lib/SwiftAwesomeNotificationsPlugin.swift b/ios/Classes/lib/SwiftAwesomeNotificationsPlugin.swift index 1c33e8bc..59e827fd 100644 --- a/ios/Classes/lib/SwiftAwesomeNotificationsPlugin.swift +++ b/ios/Classes/lib/SwiftAwesomeNotificationsPlugin.swift @@ -220,6 +220,10 @@ public class SwiftAwesomeNotificationsPlugin: case Definitions.CHANNEL_METHOD_DISMISS_NOTIFICATIONS_BY_CHANNEL_KEY: try channelMethodDismissNotificationsByChannelKey(call: call, result: result) return + + case Definitions.CHANNEL_METHOD_CANCEL_SCHEDULE: + try channelMethodCancelSchedule(call: call, result: result) + return case Definitions.CHANNEL_METHOD_CANCEL_SCHEDULES_BY_CHANNEL_KEY: try channelMethodCancelSchedulesByChannelKey(call: call, result: result) From 3aa2c60138e47f692d2279cf8ebede28bc230374 Mon Sep 17 00:00:00 2001 From: Rafael Setragni Date: Thu, 18 Jan 2024 09:41:29 -0300 Subject: [PATCH 2/2] Bump Package Version to 0.9.2 - Upgraded the package version to 0.9.2. - This version increment reflects recent enhancements and bug fixes. - Ensures users and developers are working with the latest, most stable version of the package. --- .dart_tool/package_config.json | 2 +- .idea/workspace.xml | 47 +++++++++++++++++----------------- CHANGELOG.md | 5 ++++ pubspec.yaml | 2 +- 4 files changed, 30 insertions(+), 26 deletions(-) diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json index 70dc046d..bc46f44f 100644 --- a/.dart_tool/package_config.json +++ b/.dart_tool/package_config.json @@ -296,7 +296,7 @@ "languageVersion": "2.19" } ], - "generated": "2024-01-12T00:53:30.676697Z", + "generated": "2024-01-17T11:13:42.180172Z", "generator": "pub", "generatorVersion": "3.2.3" } diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a5d72ba8..75a830a4 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -14,11 +14,10 @@ - - - + + - { + "keyToString": { + "DEBUGGABLE_DEVICE": "samsung-sm_a146m-RXCW4034MMF", + "DEBUGGABLE_PROCESS": "me.carda.awesome_notifications_example", + "DEBUGGER_ID": "Java", + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.cidr.known.project.marker": "true", + "SHARE_PROJECT_CONFIGURATION_FILES": "true", + "SHOW_ALL_PROCESSES": "false", + "cf.first.check.clang-format": "false", + "cidr.known.project.marker": "true", + "com.intellij.openapi.externalSystem.service.settings.ExternalSystemGroupConfigurable": "ALL", + "dart.analysis.tool.window.visible": "false", + "git-widget-placeholder": "release", + "io.flutter.reload.alreadyRun": "true", + "last_opened_file_path": "/Users/rafaelsetragni/GitHub/plugins/awesome_notifications", + "run.code.analysis.last.selected.profile": "pProject Default", + "settings.editor.selected.configurable": "preferences.pluginManager", + "show.migrate.to.gradle.popup": "false" } -}]]> +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 38632039..9487d951 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [0.9.2] - 2024-17-01 +### Added +- **Cancel schedule for iOS:** The feature `cancelSchedule` was added to iOS platform. +- **Example app updated:** The example app was updated to reflect the last changes. + ## [0.9.1] - 2024-11-01 ### Breaking Changes - **Progress Property Now Double:** The `progress` property in `NotificationContent` has been changed from `int` to `double`. This modification enhances the precision of progress values in notifications. diff --git a/pubspec.yaml b/pubspec.yaml index b61f0af0..f783725d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: awesome_notifications description: A complete solution to create Local and Push Notifications, customizing buttons, images, sounds, emoticons and applying many different layouts for Flutter apps. -version: 0.9.1 +version: 0.9.2 repository: https://github.com/rafaelsetragni/awesome_notifications environment: