Skip to content

Commit

Permalink
logging added
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoRecchioni committed Feb 25, 2021
1 parent c154209 commit d0d291b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions BreinifyApi/api/Breinify.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,22 @@ open class Breinify: NSObject {
if #available(iOS 10.0, *) {
let notificationRequest = request as! UNNotificationRequest
return BreinifyManager.shared.isBreinifyNotificationExtensionRequest(notificationRequest)
} else {
BreinLogger.shared.log("NotificationExtension only support from iOS 10 and above")
}
return false
}

@objc
public static func didReceiveNotificationExtensionRequest(_ request: Any,
bestAttemptContent: Any) {

if #available(iOS 10.0, *) {
let notificationRequest = request as! UNNotificationRequest
let notificationContent = bestAttemptContent as! UNMutableNotificationContent
BreinifyManager.shared.didReceiveNotificationExtensionRequest(notificationRequest, bestAttemptContent: notificationContent)
} else {
BreinLogger.shared.log("NotificationExtension only support from iOS 10 and above")
}

}

@objc
Expand All @@ -87,8 +89,9 @@ open class Breinify: NSObject {
if #available(iOS 10.0, *) {
let notificationContent = bestAttemptContent as! UNMutableNotificationContent
BreinifyManager.shared.serviceExtensionTimeWillExpire(notificationContent)
} else {
BreinLogger.shared.log("NotificationExtension only support from iOS 10 and above")
}

}

@objc
Expand Down

0 comments on commit d0d291b

Please sign in to comment.