3D Touch Plugin Not Working

I’m trying this plugin in meteor I’ve tested this plugin on iPhone 6s (iOS ver.-9.2) and app was build with Xcode 7 as per the minimum requirements of this plugin to work, but when i’m checking the availability of the plugin, the following code returns me false, am i doing something wrong?

ThreeDeeTouch.isAvailable(function (avail) {
// ‘avail’ is a boolean
alert("avail? " + avail)
});

Where are you checking this? With Cordova, you’re code should look something like this:

if (Meteor.isCordova) {
  document.addEventListener("deviceready", function() {
    ThreeDeeTouch.isAvailable(function (avail) {
      alert("avail? " + avail)
    });
  });
}

If that doesn’t work it’s probably an issue with the plugin itself, so you should file an issue on it Github for it.

1 Like

Thank you, it’s working now.

Hello,

Where do you write this code? inside the client folder or server folder? or in the lib folder?

It should be in the client folder of course, because it runs on the mobile :slight_smile:

It’s working now. the problem was with the Xcode not picking up the plugin.

In client folder, of course.