DEV Community

Caleb Hearth
Caleb Hearth

Posted on • Originally published at calebhearth.com on

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...

Read More

Reinvent your career. Join DEV.

It takes one minute and is worth it for your career.

Get started

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay