sensoryFeedback Samples App

An iPhone 15 Pro in portrait orientation showing the SensoryFeedbackSamples app. The app consists of a search box, a list of buttons with labels for each sensoryFeedback modifier, and a bottom toolbar with filter buttons indicating platforms.

SensoryFeedbackSamples is an Open Source multiplatform SwiftUI app that provides a testing palette for SwiftUI’s new .sensoryFeedback(_, trigger:) modifier.

Something I find is often missing in my personal apps is the haptic feedback that more polished apps manage. While doing a quick search for how to add these effects, I found that in relatively recent OS versions1 there is a new modifier that accepts a SensoryFeedback instance representing a “canned” bit of haptic and/or audio feedback and some kind of trigger, the simplest being an Equatable.

The actual vibrations and audio of each SensoryFeedback aren’t documented–it would be pretty difficult to do so–so I thought it would be useful to throw together a quick app that would let me “play” each of them with a button press. And so, SensoryFeedbackSamples is born!

It provides a list of buttons, each of which play some variant of SensoryFeedback. The supported platforms for each are indicated and there is search (by name of feedback) and filter (by platform) included. SensoryFeedbackSamples should be able to run on iOS, iPadOS, macOS, and watchOS. Give it a shot and let me know what fun things you build with .sensoryFeedback!

  1. iOS 17.0+, iPadOS 17.0+, macOS 14.0+, Mac Catalyst 17.0+, tvOS 17.0+, watchOS 10.0+