iOS 3D Touch Support in Native Script
Asked 07 September, 2021
Viewed 1.1K times
  • 47

I want to utilize the 3D touch support in iOS through Native Script. Currently there is a Plugin for Quick actions, however i want to listen to ForceTouch actions of iOS devices. I want to do this using native iOS API but i am not sure how to get started.
There is another plugin for Cordova by the same author, where there is a function which we can listen for force touches like below:

ThreeDeeTouch.watchForceTouches(function(result) {
    console.log("force touch % " + result.force); // 84
    console.log("force touch timestamp " + result.timestamp); // 1449908744.706419
    console.log("force touch x coordinate " + result.x); // 213
    console.log("force touch y coordinate " + result.y); // 41

How can i access to 3D Touch API in NativeScript iOS?

1 Answer