Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelsetragni committed Oct 2, 2023
2 parents e789e4f + 105b607 commit c5b098d
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .dart_tool/package_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@
"languageVersion": "2.19"
}
],
"generated": "2023-10-02T15:24:13.746064Z",
"generated": "2023-10-02T20:03:17.343139Z",
"generator": "pub",
"generatorVersion": "3.1.3"
}
8 changes: 7 additions & 1 deletion .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## [0.8.2]
### Improved
* iOS awesome_notifications library updated to version 0.8.1

## [0.8.1]
### Fixed
* Swift libraries updated to utilize a shared reference from the new Logger class.

## [0.8.0]
### Fixed
* Updated library versions to 0.8.0 to ensure that project lock files are updated.
Expand Down
18 changes: 9 additions & 9 deletions ios/Classes/lib/DartBackgroundExecutor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,19 @@ public class DartBackgroundExecutor: BackgroundExecutor {
) {

guard let dartCallbackInfo = FlutterCallbackCache.lookupCallbackInformation(dartCallbackHandle) else {
Logger.e(TAG, "There is no valid callback info to handle dart channels.")
Logger.shared.e(TAG, "There is no valid callback info to handle dart channels.")
closeBackgroundIsolate()
return
}

guard FlutterCallbackCache.lookupCallbackInformation(silentCallbackHandle) != nil else {
Logger.e(TAG, "There is no valid callback info to handle silent data.")
Logger.shared.e(TAG, "There is no valid callback info to handle silent data.")
closeBackgroundIsolate()
return
}

if(self.backgroundEngine != nil){
Logger.d(TAG, "Background isolate already started.")
Logger.shared.d(TAG, "Background isolate already started.")
closeBackgroundIsolate()
return
}
Expand Down Expand Up @@ -135,7 +135,7 @@ public class DartBackgroundExecutor: BackgroundExecutor {
)

if self.backgroundEngine == nil {
Logger.e(self.TAG, "Flutter background engine is not available.")
Logger.shared.e(self.TAG, "Flutter background engine is not available.")
self.closeBackgroundIsolate()
}
else {
Expand All @@ -155,7 +155,7 @@ public class DartBackgroundExecutor: BackgroundExecutor {
}

} catch {
Logger.e(TAG, error.localizedDescription)
Logger.shared.e(TAG, error.localizedDescription)
}
}

Expand All @@ -176,7 +176,7 @@ public class DartBackgroundExecutor: BackgroundExecutor {
self.backgroundEngine = nil

self.backgroundChannel = nil
Logger.i(TAG, "FlutterEngine instance terminated.")
Logger.shared.i(TAG, "FlutterEngine instance terminated.")
}

func dischargeNextSilentExecution(){
Expand All @@ -188,19 +188,19 @@ public class DartBackgroundExecutor: BackgroundExecutor {

func finishDartBackgroundExecution(){
if (silentDataQueue.count == 0) {
Logger.i(TAG, "All silent actions fetched.")
Logger.shared.i(TAG, "All silent actions fetched.")
self.closeBackgroundIsolate()
}
else {
Logger.i(TAG, "Remaining " + String(silentDataQueue.count) + " silents to finish")
Logger.shared.i(TAG, "Remaining " + String(silentDataQueue.count) + " silents to finish")
self.dischargeNextSilentExecution()
}
}

func executeDartCallbackInBackgroundIsolate(_ silentDataRequest:SilentActionRequest){

if self.backgroundEngine == nil {
Logger.i(TAG, "A background message could not be handle since" +
Logger.shared.i(TAG, "A background message could not be handle since" +
"dart callback handler has not been registered")
}

Expand Down
42 changes: 21 additions & 21 deletions ios/Classes/lib/SwiftAwesomeNotificationsPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public class SwiftAwesomeNotificationsPlugin:
registrar.addMethodCallDelegate(self, channel: self.flutterChannel!)
registrar.addApplicationDelegate(self)

Logger.d(SwiftAwesomeNotificationsPlugin.TAG, "Awesome Notifications plugin attached to iOS \(floor(NSFoundationVersionNumber))")
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, "Awesome Notifications - App Group : \(Definitions.USER_DEFAULT_TAG)")
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, "Awesome Notifications plugin attached to iOS \(floor(NSFoundationVersionNumber))")
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, "Awesome Notifications - App Group : \(Definitions.USER_DEFAULT_TAG)")

if !Definitions.USER_DEFAULT_TAG.starts(with: "group.") {
throw ExceptionFactory
Expand All @@ -71,7 +71,7 @@ public class SwiftAwesomeNotificationsPlugin:
}
}
catch {
Logger.e(SwiftAwesomeNotificationsPlugin.TAG, error.localizedDescription)
Logger.shared.e(SwiftAwesomeNotificationsPlugin.TAG, error.localizedDescription)
}
}

Expand All @@ -85,7 +85,7 @@ public class SwiftAwesomeNotificationsPlugin:
awesomeNotifications = nil

if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, "Awesome Notifications plugin detached from iOS \(floor(NSFoundationVersionNumber))")
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, "Awesome Notifications plugin detached from iOS \(floor(NSFoundationVersionNumber))")
}
}

Expand Down Expand Up @@ -339,7 +339,7 @@ public class SwiftAwesomeNotificationsPlugin:
.setChannel(channel: channel) ?? false

if AwesomeNotifications.debug {
Logger.e(SwiftAwesomeNotificationsPlugin.TAG, "Channel \(updated ? "" : "wasn't ")updated")
Logger.shared.e(SwiftAwesomeNotificationsPlugin.TAG, "Channel \(updated ? "" : "wasn't ")updated")
}

result(updated)
Expand All @@ -362,13 +362,13 @@ public class SwiftAwesomeNotificationsPlugin:
.removeChannel(channelKey: channelKey) ?? false {

if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, "Channel removed")
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, "Channel removed")
}
result(true)
}
else {
if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, "Channel '\(channelKey)' not found")
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, "Channel '\(channelKey)' not found")
}
result(false)
}
Expand Down Expand Up @@ -459,7 +459,7 @@ public class SwiftAwesomeNotificationsPlugin:
.dismissNotification(byId: notificationId!) ?? false

if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, dismissed ?
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, dismissed ?
"Notification \(notificationId!) dismissed":
"Notification \(notificationId!) was not found")
}
Expand All @@ -484,7 +484,7 @@ public class SwiftAwesomeNotificationsPlugin:
.cancelSchedule(byId: notificationId!) ?? false

if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, cancelled ?
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, cancelled ?
"Schedule \(notificationId!) cancelled":
"Schedule \(notificationId!) was not found")
}
Expand All @@ -509,7 +509,7 @@ public class SwiftAwesomeNotificationsPlugin:
.cancelNotification(byId: notificationId!) ?? false

if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, cancelled ?
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, cancelled ?
"Notification \(notificationId!) cancelled":
"Notification \(notificationId!) was not found")
}
Expand All @@ -533,7 +533,7 @@ public class SwiftAwesomeNotificationsPlugin:
.dismissNotifications(byChannelKey: channelKey) ?? false

if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, success ?
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, success ?
"Notifications from channel \(channelKey) dismissed":
"Notifications from channel \(channelKey) not found")
}
Expand All @@ -557,7 +557,7 @@ public class SwiftAwesomeNotificationsPlugin:
.cancelSchedules(byChannelKey: channelKey) ?? false

if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, success ?
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, success ?
"Scheduled notifications from channel \(channelKey) canceled":
"Scheduled notifications from channel \(channelKey) not found")
}
Expand All @@ -581,7 +581,7 @@ public class SwiftAwesomeNotificationsPlugin:
.cancelNotifications(byChannelKey: channelKey) ?? false

if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, success ?
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, success ?
"Notifications and schedules from channel \(channelKey) canceled":
"Notifications and schedules from channel \(channelKey) not found")
}
Expand All @@ -605,7 +605,7 @@ public class SwiftAwesomeNotificationsPlugin:
.dismissNotifications(byGroupKey: groupKey) ?? false

if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, success ?
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, success ?
"Notifications from group \(groupKey) dismissed":
"Notifications from group \(groupKey) not found")
}
Expand All @@ -629,7 +629,7 @@ public class SwiftAwesomeNotificationsPlugin:
.cancelSchedules(byGroupKey: groupKey) ?? false

if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, success ?
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, success ?
"Scheduled notifications from group \(groupKey) cancelled":
"Scheduled notifications from group \(groupKey) not found")
}
Expand All @@ -653,7 +653,7 @@ public class SwiftAwesomeNotificationsPlugin:
.cancelNotifications(byGroupKey: groupKey) ?? false

if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, success ?
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, success ?
"Notifications and schedules from group \(groupKey) cancelled":
"Notifications and schedules from group \(groupKey) not found")
}
Expand All @@ -667,7 +667,7 @@ public class SwiftAwesomeNotificationsPlugin:
.dismissAllNotifications() ?? false

if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, "All notifications was dismissed")
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, "All notifications was dismissed")
}

result(success)
Expand All @@ -679,7 +679,7 @@ public class SwiftAwesomeNotificationsPlugin:
.cancelAllSchedules() ?? false

if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, "All schedules was cancelled")
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, "All schedules was cancelled")
}

result(success)
Expand All @@ -691,7 +691,7 @@ public class SwiftAwesomeNotificationsPlugin:
.cancelAllNotifications() ?? false

if AwesomeNotifications.debug {
Logger.d(SwiftAwesomeNotificationsPlugin.TAG, "All notifications was cancelled")
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, "All notifications was cancelled")
}

result(success)
Expand Down Expand Up @@ -1023,7 +1023,7 @@ public class SwiftAwesomeNotificationsPlugin:
backgroundHandle: dartBgHandle,
debug: debug)

Logger.d(SwiftAwesomeNotificationsPlugin.TAG, "Awesome Notifications service initialized")
Logger.shared.d(SwiftAwesomeNotificationsPlugin.TAG, "Awesome Notifications service initialized")
result(awesomeNotifications != nil)
}

Expand All @@ -1045,7 +1045,7 @@ public class SwiftAwesomeNotificationsPlugin:

let success = actionHandle != 0
if !success {
Logger.e(SwiftAwesomeNotificationsPlugin.TAG, "Attention: there is no valid static method to receive notification action data in background")
Logger.shared.e(SwiftAwesomeNotificationsPlugin.TAG, "Attention: there is no valid static method to receive notification action data in background")
}

result(success)
Expand Down
2 changes: 1 addition & 1 deletion ios/awesome_notifications.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'awesome_notifications'
s.version = '0.8.0'
s.version = '0.8.1'
s.summary = 'A complete solution to create Local and Push Notifications, through Firebase or another services, using Flutter.'
s.description = <<-DESC
A complete solution to create Local Notifications and Push Notifications, through Firebase or another services, using Flutter.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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.8.0
version: 0.8.2
repository: https://github.com/rafaelsetragni/awesome_notifications

environment:
Expand Down

0 comments on commit c5b098d

Please sign in to comment.