Is there a way for haptic feedback to work when AudioKit has been started? If I disable AudioKit the
let generator = UISelectionFeedbackGenerator()
generator.selectionChanged()
code works, but when AudioKit has been started it fails.
Is there a way for haptic feedback to work when AudioKit has been started? If I disable AudioKit the
let generator = UISelectionFeedbackGenerator()
generator.selectionChanged()
code works, but when AudioKit has been started it fails.
The reason for this is that iOS turns off haptic feedback when audio input is active. Which kind of makes sense, since any vibrations generated by the haptic engine would be recorded in some way by the microphone.
This also applies to apps that record audio in the background. If one of those is running, another app's haptic feedback will not work.
If your app doesn't require audio input, try using AKSettings.enableAudioInput = false
If it does require input, there's nothing you can do.
Available from iOS 13, you can override the default behavior to suppress haptics whilst microphone is active. Setting AKSetings.allowHapticsAndSystemSoundsDuringRecording = true
will allow haptic events to be delivered.