Vibration on iOS with cocos2d-JS

Hi, I have the vibration working on Android, but I dont know how to do it for iOS. I’ve seen this topic and I suppose it works, but I have not idea how to call the function TTNative::vibrate from my code in javascript.

If somebody can tell how to do that, or another way to implement the vibration on ios, would be great. Thanks!

1 Like

Hello? Anybody?

cc.Device.vibrate(duration);

I tried it and this does not work on Android. Does it work on iOS? (I can’t test on it right now)

it worked on IOS!