We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d98525 commit 17cef50Copy full SHA for 17cef50
Sources/OpenSwiftUI/View/Control/SensoryFeedback/SensoryFeedbackGenerator.swift
@@ -226,3 +226,23 @@ private struct FeedbackGenerator<T>: SensoryFeedbackGeneratorModifier where T: E
226
}
227
228
229
+
230
+#if !canImport(Darwin)
231
+// MARK: - View + platformSensoryFeedback
232
233
+extension View {
234
+ nonisolated func platformSensoryFeedback<Base>(
235
+ _ base: Base
236
+ ) -> some View where Base: SensoryFeedbackGeneratorModifier {
237
+ modifier(base)
238
+ }
239
+}
240
241
+// MARK: - FeedbackRequestContext
242
243
+struct FeedbackRequestContext {
244
+ func implementation(type: SensoryFeedback.FeedbackType) -> (any PlatformSensoryFeedback)? {
245
+ nil
246
247
248
+#endif
0 commit comments