We check [UIApplication sharedApplication].keyWindow.traitCollection.forceTouchCapability = UIForceTouchCapabilityAvailable to find the 3D touch support. If supported we added shortcut items to the application.
But in iPhone XR above check always return false.
How to validate whether the device has supported Haptic Touch or not ?
Several solutions described here:
import CoreHaptics
var supportsHaptics: Bool = false
// Check if the device supports haptics.
let hapticCapability = CHHapticEngine.capabilitiesForHardware()
supportsHaptics = hapticCapability.supportsHaptics
Tested on iPhone Xs. returns true, as expected
Note it does not work on simulator (tested with XCode 11.3 on iPhone 11Pro 13.3): returns false