Skip to content

Commit

Permalink
Merge pull request #56 from sakrist/master
Browse files Browse the repository at this point in the history
fix for macOS target
  • Loading branch information
simibac authored Jan 21, 2025
2 parents ff05389 + ffc46c1 commit 77ce21c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/ConfettiSwiftUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public struct ConfettiCannon<T: Equatable>: View {
for i in 0..<confettiConfig.repetitions{
DispatchQueue.main.asyncAfter(deadline: .now() + confettiConfig.repetitionInterval * Double(i)) {
animate.append(false)

#if canImport(UIKit)
if confettiConfig.hapticFeedback {
let impactFeedback = UIImpactFeedbackGenerator(style: .heavy)
impactFeedback.impactOccurred()
Expand All @@ -149,6 +149,7 @@ public struct ConfettiCannon<T: Equatable>: View {
let impactFeedback = UIImpactFeedbackGenerator(style: .heavy)
impactFeedback.impactOccurred()
}
#endif
}
}
}
Expand Down

0 comments on commit 77ce21c

Please sign in to comment.