Latest 1.0.1
License MIT
Platforms ios 8.0
Frameworks UIKit, AVFoundation


The easiest way to provide feedback in the form of haptics and sounds for your users.

Providing feedback to your users is important; from indicating that a button was tapped, to indicating that an error occurred.


Feedback is an evolution of my other pod, HapticGenerator. Just like HapticGenerator,
Feedback provides an easy and coherent way to generate different types of haptic feedback.
Feedback goes a step further and allows you to also play sound as feedback, either with
or without accompanying haptics.

Feedback comes with a few default sounds, courtesy of Facebook’s Sound Kit, but also has
an option to allow you to use custom sounds, which means it will work with any brand.

Note that the provided sounds are for prototyping only (see Facebook’s terms for Sound Kit), in production you must provide your own custom sounds, which Feedback supports.


Feedback is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "FeedbackGenerator"


Using Feedback, just like HapticGenerator, is incredibly simple. You can create generators that
provide just haptics, haptics and sound, or just sound.

Here’s how to create a feedback generator that provides has a "success" haptic:

let successGenerator = Feedback(hapticType: .notification(.success))

Here’s how to create a feedback generator that just provides a default "error" sound:

let errorGenerator = Feedback(soundType: .notification(.error))

Here’s how to create a feedback generator that provides both a haptic and a sound:

let selectionGenerator = Feedback(hapticType: .selection, soundType: .selection)

Once you’ve created your generator, all you have to do to generate the feedback is this:


Optionally, if you know in advance when your feedback is likely to be generated, you
can prepare the system for its use:


You can also provide the name of a custom sound file to use with or without haptics:

let customSoundWithHaptic = Feedback(hapticType: .impact(.light), soundType: .custom(soundName: "customFileName", extension: "mp3"))


Feedback works as far back as iOS 8, but haptics will only play on supported devices running iOS 10 or newer.
Under the hood, Feedback uses UIKit and AVFoundation.




Feedback is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "FeedbackGenerator",
    "version": "1.0.1",
    "summary": "Feedback is a small and easy to use wrapper, for generating different styles of feedback in the form of haptics, sounds, or both.",
    "description": "Feedback is a really easy way to provide nuanced and helpful feedback to your users on iOS.nFeedback comes in the form of haptics, or sounds, or both. With Feedback you can use the defaultnsounds for different types of feedback, or provide a custom sound to use.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Kane Cheshire": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.1"
    "social_media_url": "",
    "platforms": {
        "ios": "8.0"
    "source_files": "Feedback/Classes/**/*",
    "resource_bundles": {
        "FeedbackAssets": [
    "frameworks": [
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This