Hapticode
- 2 Devlogs
- 5 Total hours
Find the perfect haptic for your iOS app
Find the perfect haptic for your iOS app
Today I worked on UI and making the app compatible with older versions of iOS.
I added a nice background gradient, with dark mode support, of course. I also worked on the “not listed as supported” warning.
Apples docs seem to be wrong, or something, with how they list what operating systems are supported to different haptics. Some that say they silly iOS don’t play anything, and some that don’t have iOS listed in their soldered operating systems, actually do play a haptic!? 🤷♂️.
At first I wanted a tool tip to show what the warning symbol meant, but tool tips are very hard to deal with and they’re kinda confusing. So, I settled with an alert.
I added a long press to get the links to the docs feature, so you can easily get to the docs. But, it’s kinda broken, I’ll be fixing that soon.
I also worked on being able to stylet back to iOS 15, the farthest Xcode will let me. My code base is now full of condition stuff for working with older OS’s, but that’s the price you must pay, 🙃.
Anyway, here’s some screenshots of the app:
I started my first Stardance project, Hapticode.
Hapticode is an app that lets you test different haptics on iOS, so you can find the perfect haptic for your app.
I added the basic haptics from SwiftUI using the .sensoryFeedback() modifier.
An interesting issue I have encountered is that SwiftUI doesn’t always run the haptic when you ask it to, so I still have to figure out how to play those haptics. Maybe they are only available to the operating system?
Here’s a picture of the current list of all the haptics.