Skip to content

Commit 77ce21c

Browse files
authored
Merge pull request #56 from sakrist/master
fix for macOS target
2 parents ff05389 + ffc46c1 commit 77ce21c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: Sources/ConfettiSwiftUI.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public struct ConfettiCannon<T: Equatable>: View {
139139
for i in 0..<confettiConfig.repetitions{
140140
DispatchQueue.main.asyncAfter(deadline: .now() + confettiConfig.repetitionInterval * Double(i)) {
141141
animate.append(false)
142-
142+
#if canImport(UIKit)
143143
if confettiConfig.hapticFeedback {
144144
let impactFeedback = UIImpactFeedbackGenerator(style: .heavy)
145145
impactFeedback.impactOccurred()
@@ -149,6 +149,7 @@ public struct ConfettiCannon<T: Equatable>: View {
149149
let impactFeedback = UIImpactFeedbackGenerator(style: .heavy)
150150
impactFeedback.impactOccurred()
151151
}
152+
#endif
152153
}
153154
}
154155
}

0 commit comments

Comments
 (0)