Skip to content

Error with the configuration of the plugin Motion #91

Open
@loicparent

Description

@loicparent

Describe the bug
Hello,
An error appears when I try to set the plugin @capacitor/motion.

To reproduce
Steps to reproduce the behavior:

  1. Install an blank ionic project + add www and ìos`
  2. Install the plugin using these commands: npm install @capacitor/motion npx cap sync
  3. Open the file app.component.ts
  4. Add the imports on the top of the file
  5. In the function ngOnInit(), add the method to request the permission `await DeviceMotionEvent.requestPermission();``
  6. See the error (red underline below requestPermission): Property 'requestPermission' does not exist on type '{ new (type: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent; prototype: DeviceMotionEvent; }'

Screenshot
render

Expected behavior
Don't have any error when I try to setup the plugin following the instructions.

Browser and OS (please complete the following information)

  • OS: MacOs Monterey 12.6
  • Browser: Chrome
  • Version: 105.0.5195.125

Thank you for your help,
Loïc

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions