-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy pathPhotos.swift
38 lines (35 loc) · 1.13 KB
/
Photos.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
#if canImport(Photos)
import Photos
@available(iOS 14, macCatalyst 14, macOS 11, tvOS 14, *)
extension PHAccessLevel: CustomDumpStringConvertible {
public var customDumpDescription: String {
switch self {
case .addOnly:
return "PHAccessLevel.addOnly"
case .readWrite:
return "PHAccessLevel.readWrite"
@unknown default:
return "PHAccessLevel.(@unknown default, rawValue: \(self.rawValue))"
}
}
}
@available(iOS 8, macCatalyst 13, macOS 10.13, tvOS 10, *)
extension PHAuthorizationStatus: CustomDumpStringConvertible {
public var customDumpDescription: String {
switch self {
case .authorized:
return "PHAuthorizationStatus.authorized"
case .denied:
return "PHAuthorizationStatus.denied"
case .notDetermined:
return "PHAuthorizationStatus.notDetermined"
case .restricted:
return "PHAuthorizationStatus.restricted"
case .limited:
return "PHAuthorizationStatus.limited"
@unknown default:
return "PHAuthorizationStatus.(@unknown default, rawValue: \(self.rawValue))"
}
}
}
#endif