From 0792e686c02a5466d08564e840a293d203e6aaea Mon Sep 17 00:00:00 2001 From: Dmitriy Zharov Date: Wed, 3 Apr 2024 13:07:14 +0800 Subject: [PATCH] Marks UIHapticFeedbackPerformer.perform() with @MainActor --- Sources/HapticFeedback/HapticFeedback.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/HapticFeedback/HapticFeedback.swift b/Sources/HapticFeedback/HapticFeedback.swift index 7bbd88e..09178ab 100644 --- a/Sources/HapticFeedback/HapticFeedback.swift +++ b/Sources/HapticFeedback/HapticFeedback.swift @@ -409,7 +409,8 @@ private class HapticFeedbackManager { #if os(iOS) || targetEnvironment(macCatalyst) private final class _UIHapticFeedbackPerformer: HapticFeedbackPerformer { private let _cache: [HapticFeedback.FeedbackType: UIFeedbackGenerator] = [:] - + + @MainActor func perform(_ feedbackType: HapticFeedback.FeedbackType) { switch feedbackType { case .success: