leecrossley / cordova-plugin-shake

Cordova / PhoneGap Plugin to detect when a physical device performs a shake gesture
http://ilee.co.uk
92 stars 33 forks source link

iOS shake detection doesn't work #37

Closed idoodler closed 2 years ago

idoodler commented 3 years ago

We recently updated to the latest cordova for iOS 6.2.0.

This plugin injects the motionEnded function in to the MainViewController.m file but it looks like nothing from the MainViewController.mfile is called.

Does someone experience the same behaviour?

Ritzlgrmft commented 3 years ago

Maybe this helps, at least to understand your issue better: https://github.com/leecrossley/cordova-plugin-shake/issues/36#issuecomment-647161870

idoodler commented 3 years ago

We are using plain cordova, not capacitor. It looks like the MainViewController.m file is deprecated and not used anymore. If i manually add the motionEnded method function to CDVViewController.h inside the CordovaLib project it works fine.