forked from pointfreeco/swift-custom-dump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UserNotificationsUI.swift
41 lines (39 loc) · 1.53 KB
/
UserNotificationsUI.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#if canImport(UserNotificationsUI)
import UserNotificationsUI
@available(iOS 10, macCatalyst 14, macOS 11, *)
@available(tvOS, unavailable)
@available(watchOS, unavailable)
extension UNNotificationContentExtensionMediaPlayPauseButtonType: CustomDumpStringConvertible {
public var customDumpDescription: String {
switch self {
case .default:
return "UNNotificationContentExtensionMediaPlayPauseButtonType.default"
case .none:
return "UNNotificationContentExtensionMediaPlayPauseButtonType.none"
case .overlay:
return "UNNotificationContentExtensionMediaPlayPauseButtonType.overlay"
@unknown default:
return
"UNNotificationContentExtensionMediaPlayPauseButtonType.(@unknown default, rawValue: \(self.rawValue))"
}
}
}
@available(iOS 10, macCatalyst 14, macOS 11, *)
@available(tvOS, unavailable)
@available(watchOS, unavailable)
extension UNNotificationContentExtensionResponseOption: CustomDumpStringConvertible {
public var customDumpDescription: String {
switch self {
case .dismiss:
return "UNNotificationContentExtensionResponseOption.dismiss"
case .dismissAndForwardAction:
return "UNNotificationContentExtensionResponseOption.dismissAndForwardAction"
case .doNotDismiss:
return "UNNotificationContentExtensionResponseOption.doNotDismiss"
@unknown default:
return
"UNNotificationContentExtensionResponseOption.(@unknown default, rawValue: \(self.rawValue))"
}
}
}
#endif