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
on iOS 13 you can check it in a very straightforward fashion. Following this documentation page, all you have to do is:
var supportsHaptics: Bool = false
...
// Check if the device supports haptics.
let hapticCapability = CHHapticEngine.capabilitiesForHardware()
supportsHaptics = hapticCapability.supportsHaptics