Questions tagged [uifeedbackgenerator]

15 questions
27
votes
6 answers

How to check if Haptic Engine (UIFeedbackGenerator) is supported

I am wondering how we could check if the new iOS 10 API UIFeebackGenerator is available on the current device. There are some more things we would need to check: The device needs to run iOS 10.0 or later The device needs to be an iPhone 7 or…
Hans Knöchel
  • 11,422
  • 8
  • 28
  • 49
25
votes
1 answer

iOS app crashed due to [UIFeedbackGenerator _autoDeactivate]

I received the following report from Crashlytics. I was not calling[UIFeedbackGenerator _autoDeactivate] myself. Maybe some library was doing that. I have done some research but could not find any useful information. Does anyone know what this crash…
ukim
  • 2,395
  • 15
  • 22
13
votes
3 answers

UIFeedback Haptic Engine called more times than was activated

I am using the UIFeedback Haptic Engine with swift 2.3 like: let generator = UINotificationFeedbackGenerator() generator.notificationOccurred(.Warning) and let generator = UIImpactFeedbackGenerator(style: .Heavy) generator.impactOccurred() Today I…
fatihyildizhan
  • 8,614
  • 7
  • 64
  • 88
7
votes
1 answer

UIFeedbackGenerator object creation crashes on iOS 10.0

Has anyone else encountered this? Specifically with an iPhone 6 running iOS 10.0 I'm getting consistent reports of the following crashing: if #available(iOS 10.0, *) { UISelectionFeedbackGenerator() } Where it's not even being used, just…
Doug Smith
  • 29,668
  • 57
  • 204
  • 388
3
votes
1 answer

AVHapticPlayer async call finishWithCompletionHandler: (type=3) did not get a reply after 30 seconds

Problem I am using Haptic Feedback in my app for when the user moves some tiles. When the tiles are moved very quickly, causing the haptic feedback to trigger quickly, I get this warning in the console after 30 seconds: 2019-01-20…
George
  • 25,988
  • 10
  • 79
  • 133
1
vote
2 answers

UIImpactFeedbackGenerator delayed after calling impactOccured

I am trying to use UIImpactFeedbackGenerator in a AVCaptureSession. I have AVAudioSession.sharedInstance().setAllowHapticsAndSystemSoundsDuringRecording(true) to allow haptic feedback while in a session (iOS 13 only). However, the feedback is…
aaaav
  • 151
  • 9
1
vote
1 answer

iOS: How to check is Haptic Feedback enabled (iOS Settings)

Is it possible to read the option in the iOS settings whether the haptic feedback is activated or deactivated?
Stefan
  • 190
  • 1
  • 11
1
vote
1 answer

Is there a quick way to determine if the iPhone model is newer than a certain model?

I am trying to apply the Haptic vibration effect. But it looks like that only iPhone 7 or later support this cool feature. I have already read this thread. How to determine the current iPhone/device model? Is there a function I can use to just…
William Tong
  • 479
  • 7
  • 14
1
vote
2 answers

Creating a haptic feedback pattern in swift 3

I am very new to Swift and programming. I'm trying to create a pattern of haptic feedback triggered by a UILongPressGestureRecognizer. When the user "long presses" the screen, I want the phone to vibrate three times with a 1 second delay between…
1
vote
0 answers

UIFeedbackGenerator and Airplay second screen

I'm building a second screen app (using AirPlay) wehre the iOS device is a remote control for the UI on the second screen. I wanted to use UIFeedbackGenerator (respectively UIImpactFeedbackGenerator) to produce haptic feedback when pressing buttons…
benjamin.ludwig
  • 1,575
  • 18
  • 28
0
votes
0 answers

SwiftUI: UIFeedbackGenerator is not working on iPhone6s

I have the file described bellow to enable haptic feedback in SwiftUI. This functionality works fine on devices like the iPhone 11 Pro Max, 12 Pro Max, and iPhone 8 but strangely just not on the iPhone 6s. Does anyone know why? Note: Yes, the iPhone…
SwiftUI_Max
  • 201
  • 2
  • 6
0
votes
1 answer

Haptic FeedBack Still Going After Switching The View Controller

I have a secondary View Controller that uses some haptic feedback. I am triggering the haptic feedback on a scheduled timer that loops every 14 seconds Timer.scheduledTimer(withTimeInterval: 14, repeats: true) { _ in …
0
votes
1 answer

Do Core Haptics and Core Bluetooth interfere?

Setup My iOS application is communicating with a BLE device. As a response to certain events within this communication, I would like to provide haptic feedback to the user. In an attempt to support older phones like the iPhone 7, I decided to use…
jraufeisen
  • 3,005
  • 7
  • 27
  • 43
0
votes
0 answers

Vibrate using UIFeedbackGenerator or AudioServicesPlaySystemSound

When I want an iPhone to vibrate, how can I determine whether to use UIFeedbackGenerator or AudioServicesPlaySystemSound? The new haptic engine is only available on iOS10 and on the iPhone 7 models, so how would we write code that uses this new…
Daniel Larsson
  • 6,278
  • 5
  • 44
  • 82
0
votes
1 answer

With iPhone 7 and UIFeedbackGenerator, which system actions perform which kinds of taptic feedback?

(This question is mostly applicable to those of us developing iPhone apps without access to an iPhone 7.) I want to incorporate the new taptic feedback available with the iPhone 7 into my apps, and I want to make sure my uses of it align properly…
Doug Smith
  • 29,668
  • 57
  • 204
  • 388