File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Sources/Segment/Plugins/Platforms/iOS Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -14,20 +14,29 @@ import UIKit
1414// MARK: - Remote Notifications
1515
1616public protocol RemoteNotifications : Plugin {
17+ func declinedRemoteNotifications( )
1718 func registeredForRemoteNotifications( deviceToken: Data )
1819 func failedToRegisterForRemoteNotification( error: Error ? )
1920 func receivedRemoteNotification( userInfo: [ AnyHashable : Any ] )
2021 func handleAction( identifier: String , userInfo: [ String : Any ] )
2122}
2223
2324extension RemoteNotifications {
25+ public func declinedRemoteNotifications( ) { }
2426 public func registeredForRemoteNotifications( deviceToken: Data ) { }
2527 public func failedToRegisterForRemoteNotification( error: Error ? ) { }
2628 public func receivedRemoteNotification( userInfo: [ AnyHashable : Any ] ) { }
2729 public func handleAction( identifier: String , userInfo: [ String : Any ] ) { }
2830}
2931
3032extension Analytics {
33+ public func declinedRemoteNotifications( ) {
34+ apply { plugin in
35+ if let p = plugin as? RemoteNotifications {
36+ p. declinedRemoteNotifications ( )
37+ }
38+ }
39+ }
3140 public func registeredForRemoteNotifications( deviceToken: Data ) {
3241 setDeviceToken ( deviceToken. hexString)
3342
You can’t perform that action at this time.
0 commit comments