Is it possible to read the option in the iOS settings whether the haptic feedback is activated or deactivated?
How to check is Haptic Feedback enabled (iOS Settings)
The documentation says “As a general rule, trust the system to determine whether it should play feedback.” It’s harmless to use a UIFeedbackGenerator on a device that doesn’t support haptics. What would you do differently?
A user can activate or deactivate the system haptics under iOS Settings / Sounds and Haptics. I would like to read the value here.
Right, but knowing your use case might help someone give you a solution.
The use case is that the dialogues are to be replaced by the haptic feedback. So instead of showing a dialogue, there should be success as vibration. If the vibration is not available, the dialog must be displayed. Therefore, in my case, I would have to know whether this switch is on or off.
My reading of the documentation suggests you won't be able to know.
Even if it is enabled, a low power state might cause it to not happen.