Open dmazzola opened 7 years ago
Have a look at https://github.com/Ritzlgrmft/ionic-feedback-sample. This is a app built with Cordova using the shake event. I just checked, it is working with different iOS devices.
BTW: for iOS, you do not need the device-motion plugin, since the latest version of the shake-plugin relies on the native shake implementation of iOS.
I have used this code for my University classes for the past few years. This weekend, I have recompiled and tested Android 5.1.1 on Samsung Galaxy and iOS 10.3.3 (iPhone 6) and iOS 11.1.2 on an iPad Air.
onShake doesn't fire on either iOS device. Works fine on Android. Using build.phonegap.com with the following key items from index.xml:
I have also tested with cli-6.4.0 cli-6.3.1 and I observe no change (works on android, not iOS)
The index.js code is:
onDeviceReady()
is being called as this line is functioningshakeNode.innerHTML = "or you can shake me!"
Developer debugging via safari and USB cable shows:shake
is definedonShake()
works in the debugger console (alert is called, color changes).clicking the "press me" button calls
changeColor()
and color changes See belowQuestions
(oh, and the phonegap build logs are clean too)