import SwiftUI #if os(iOS) import UIKit #endif enum Haptics { static func selection() { #if os(iOS) UISelectionFeedbackGenerator().selectionChanged() #endif } static func success() { #if os(iOS) UINotificationFeedbackGenerator().notificationOccurred(.success) #endif } static func warning() { #if os(iOS) UINotificationFeedbackGenerator().notificationOccurred(.warning) #endif } }