File tree Expand file tree Collapse file tree 5 files changed +13
-1
lines changed Expand file tree Collapse file tree 5 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ import PackageDescription
5
5
let package = Package (
6
6
name: " AlertKit " ,
7
7
platforms: [
8
- . iOS( . v13)
8
+ . iOS( . v13) ,
9
+ . tvOS( . v13)
9
10
] ,
10
11
products: [
11
12
. library(
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ Pod::Spec.new do |s|
10
10
11
11
s . swift_version = '5.1'
12
12
s . ios . deployment_target = '13.0'
13
+ s . tvos . deployment_target = '13.0'
13
14
14
15
s . source_files = 'Sources/AlertKit/**/*.swift'
15
16
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ public enum AlertHaptic {
8
8
case none
9
9
10
10
func impact( ) {
11
+ #if os(iOS)
11
12
let generator = UINotificationFeedbackGenerator ( )
12
13
switch self {
13
14
case . success:
@@ -19,5 +20,6 @@ public enum AlertHaptic {
19
20
case . none:
20
21
break
21
22
}
23
+ #endif
22
24
}
23
25
}
Original file line number Diff line number Diff line change @@ -19,11 +19,15 @@ public class AlertAppleMusic16View: UIView {
19
19
20
20
private lazy var backgroundView : UIVisualEffectView = {
21
21
let view : UIVisualEffectView = {
22
+ #if !os(tvOS)
22
23
if #available( iOS 13 . 0 , * ) {
23
24
return UIVisualEffectView ( effect: UIBlurEffect ( style: . systemThickMaterial) )
24
25
} else {
25
26
return UIVisualEffectView ( effect: UIBlurEffect ( style: . light) )
26
27
}
28
+ #else
29
+ return UIVisualEffectView ( effect: UIBlurEffect ( style: . light) )
30
+ #endif
27
31
} ( )
28
32
view. isUserInteractionEnabled = false
29
33
return view
Original file line number Diff line number Diff line change @@ -19,11 +19,15 @@ public class AlertAppleMusic17View: UIView {
19
19
20
20
private lazy var backgroundView : UIVisualEffectView = {
21
21
let view : UIVisualEffectView = {
22
+ #if !os(tvOS)
22
23
if #available( iOS 13 . 0 , * ) {
23
24
return UIVisualEffectView ( effect: UIBlurEffect ( style: . systemThickMaterial) )
24
25
} else {
25
26
return UIVisualEffectView ( effect: UIBlurEffect ( style: . light) )
26
27
}
28
+ #else
29
+ return UIVisualEffectView ( effect: UIBlurEffect ( style: . light) )
30
+ #endif
27
31
} ( )
28
32
view. isUserInteractionEnabled = false
29
33
return view
You can’t perform that action at this time.
0 commit comments