Skip to content

Commit

Permalink
Attempt to fix UNUserNotificationCenterDelegateProxy
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoEmbrace committed Nov 5, 2024
1 parent 3120f2b commit eb4720a
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,24 @@ class UNUserNotificationCenterDelegateProxy: NSObject {
init(captureData: Bool) {
self.captureData = captureData
}

override func responds(to aSelector: Selector!) -> Bool {
if super.responds(to: aSelector) {
return true
} else if let originalDelegate = originalDelegate, originalDelegate.responds(to: aSelector) {
return true
}
return false
}

override func forwardingTarget(for aSelector: Selector!) -> Any? {
if super.responds(to: aSelector) {
return self
} else if let originalDelegate = originalDelegate, originalDelegate.responds(to: aSelector) {
return originalDelegate
}
return nil
}
}

extension UNUserNotificationCenterDelegateProxy: UNUserNotificationCenterDelegate {
Expand Down

0 comments on commit eb4720a

Please sign in to comment.