SwiftUI Singleton up:: SwiftUI onboarding class HapticManager { static let instance = HapticManager() // Singleton func notification() { print("Hello world") } } Use like HapticManger.instance.notification()