Skip to content

Commit e3d703d

Browse files
committed
Fixed watchOS compatibility.
1 parent f55b491 commit e3d703d

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Sources/SwiftUIExtension/Compability/SymbolEffect.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import SwiftUI
33
extension View {
44

55
public func symbolEffectCompability(_ model: SymbolEffectCompability) -> some View {
6-
if #available(iOS 17, *) {
6+
if #available(iOS 17, watchOS 10.0, *) {
77
return self.symbolEffect(.pulse)
88
} else {
99
return self

Sources/SwiftUIExtension/Extensions/View+Haptic.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct SensoryFeedbackModifier<T: Equatable>: ViewModifier {
1818
}
1919

2020
func body(content: Content) -> some View {
21-
if #available(iOS 17.0, *) {
21+
if #available(iOS 17.0, watchOS 10.0, *) {
2222
content
2323
.sensoryFeedback(.selection, trigger: trigger)
2424
} else {

Sources/SwiftUIExtension/Views/SelectableStack.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ public struct SelectableStack<Data, Content>: View where Data : RandomAccessColl
3333
}
3434
}
3535
}
36+
#if os(iOS)
3637
.onChange(of: selectedElement) { _ in
3738
UIFeedbackGenerator.impactOccurred(.light)
3839
}
40+
#endif
3941
case .horizontal:
4042
EmptyView()
4143
}

0 commit comments

Comments
 (0)