I made a game 2 years ago using the 3D touch feature in Swift because it was pretty new but I've never released the game because I got a new contract. Now I have time I want to release it but the code doesn't work any more. (3D touch custom actions, not the peek & pop action)
When I print the touch result, the force value will always return 0.0 like this:
[<UITouch: 0x102613850> phase: Began tap count: 2 force: 0.000 window: <UIWindow: 0x10222bf70; frame = (0 0; 414 896); gestureRecognizers = <NSArray: 0x28011cde0>; layer = <UIWindowLayer: 0x280f41840>> view: <UIView: 0x102083080; frame = (0 82; 414 780); autoresize = RM+BM; gestureRecognizers = <NSArray: 0x2801a0c30>; layer = <CALayer: 0x280f2a540>> location in window: {299.33332824707031, 661.66665649414062} previous location in window: {299.33332824707031, 661.66665649414062} location in view: {299.33332824707031, 579.66665649414062} previous location in view: {299.33332824707031, 579.66665649414062}]
I know Apple is removing this feature from devices cause of the cost but as I remember, the iPhone 11 pro still has it. Does anyone know if this value is deprecated?
These devices support Haptic Touch:
These devices support 3D Touch:
Datasource (2020 January) Change 3D or Haptic Touch sensitivity on your iPhone
Solution
Check a presence of 3D Touch on a device