Testing Capacitor Plugin "Motion" in live reload mode

Hello,

I try to test the motion plugin on my phone with the live reload mode to avoid building the entire app, opening Xcode etc. when I change something. But I get an error when I try to use the Motion functions.

Here is the command I launch to test with the live reload mode:
ionic cap run ios --open -l --external.

Here is one of the functions I call in my app:
(DeviceOrientationEvent as any).requestPermission()

Here is the error I get with this call (only with the live reload mode):
No device orientation events will be fired, reason: Browsing context is not secure.

Could someone help me with this?

Thanks,
Loïc

It’s not advisable to test native device features using live reload. I know building entire app is not productive but sometimes its necessary.

Hello @Hills90210,

Thank you for your reply :slight_smile:

Ok I understand that this is a native feature but I assumed that since this feature is also available in web, it would have been compatible with live reload mode.

Yes, this is less productive because I have to build and install the app on real device at each change related to this feature :confused:

Kind regards,
Loïc