{"_id":"@capawesome/capacitor-gyroscope","_rev":"4-b5932d4ad144272a0dd094566bdf6e50","name":"@capawesome/capacitor-gyroscope","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.1":{"name":"@capawesome/capacitor-gyroscope","version":"0.0.1","keywords":["capacitor","plugin","native"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-gyroscope@0.0.1","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/plugins/gyroscope/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"2856fc6c2fdef59d22179718eecde9f86a8dca2a","tarball":"https://registry.npmjs.org/@capawesome/capacitor-gyroscope/-/capacitor-gyroscope-0.0.1.tgz","fileCount":38,"integrity":"sha512-jbzW4SNPyiliX9DmU2DqTg6X8RQONFTKv9bsL1kfc/so15KO37me4xxlP38Jm0sK1ksvWBjrBz8pngn+af3GTA==","signatures":[{"sig":"MEUCIQCJpr6vpMSSA5FuGggqqVsRzZZHnY5XWH6xoqu2aKmckQIgUe3K74AVb9vuxzSDTxeR1OLe2Kt7MDnVsuOI2LhMH6s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":92333},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"8dd31ce5d3f16f94fb71d033f47512e99908f4e4","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api GyroscopePlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"robingenz","email":"mail@robingenz.dev"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.13.0","description":"Capacitor plugin to read the device's gyroscope sensor.","directories":{},"_nodeVersion":"24.16.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-gyroscope_0.0.1_1783405254498_0.36611991586709824","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@capawesome/capacitor-gyroscope","version":"0.1.0","keywords":["capacitor","plugin","native","capacitor-plugin","gyroscope","gyro","rotation rate","motion sensor","device motion","angular velocity"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-gyroscope@0.1.0","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/gyroscope/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"65c9e7e2635f9cb01706fccf0a04a4ec7786ab00","tarball":"https://registry.npmjs.org/@capawesome/capacitor-gyroscope/-/capacitor-gyroscope-0.1.0.tgz","fileCount":38,"integrity":"sha512-7FvYn3NVrPFSrBqbyRnQcpp7gGXMBiEJAZ5tS7hLXiunIpV+fC4b7ch41NeGEw2RM5lELc9CGiCAvb069Hlwqw==","signatures":[{"sig":"MEYCIQCoiIVjoStUP7ykprMAiE/VtoEesXXM49qKCRMaV0xfVgIhANEozyChjzNwbSpUco8cE8SGHN/UpTYMZPL2dJ2SYqYP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-gyroscope@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":97039},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"1ce17b1fd14c43b2f1d5d3c2da82221e1d1dca37","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api GyroscopePlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:37233605-dba3-4cf9-9597-46b1431220d3"}},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.16.0","description":"Capacitor plugin to read the device's gyroscope sensor on Android and iOS.","directories":{},"_nodeVersion":"24.18.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-gyroscope_0.1.0_1784015518219_0.19690447225536567","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@capawesome/capacitor-gyroscope","version":"0.1.1","keywords":["capacitor","plugin","native","capacitor-plugin","gyroscope","gyro","rotation rate","motion sensor","device motion","angular velocity"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-gyroscope@0.1.1","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/gyroscope/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"cc06f4f43ee31adc9be5cc251e33838983ee2387","tarball":"https://registry.npmjs.org/@capawesome/capacitor-gyroscope/-/capacitor-gyroscope-0.1.1.tgz","fileCount":38,"integrity":"sha512-3Q+eWckpQftaORO+czqefM7r0a6L2uNvYm+Q79mXhfNIkxALtzj6sAgKBLGkfJoiMnaHc2OTIyMmOaeLMINJSQ==","signatures":[{"sig":"MEYCIQDeZAdyHQVzGmlLG8/wvROwjI+EQ9DrCcdAZeR3ytjzjwIhAN3Ucvxwwt/JsfbwPYxbuCR1PwQoWTD5+VaKnKns6S9e","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-gyroscope@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":97048},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"3e61f4b412f9f3f512c21169bb135bbb23a67e6d","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api GyroscopePlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:37233605-dba3-4cf9-9597-46b1431220d3"}},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.16.0","description":"Capacitor plugin to read the device's gyroscope sensor on Android and iOS.","directories":{},"_nodeVersion":"24.18.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-gyroscope_0.1.1_1784102972136_0.4662312192258644","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@capawesome/capacitor-gyroscope","version":"0.1.2","description":"Capacitor plugin to read the device's gyroscope sensor on Android and iOS.","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-plugins.git"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"funding":[{"type":"github","url":"https://github.com/sponsors/capawesome-team/"},{"type":"opencollective","url":"https://opencollective.com/capawesome"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/gyroscope/","keywords":["capacitor","plugin","native","capacitor-plugin","gyroscope","gyro","rotation rate","motion sensor","device motion","angular velocity"],"scripts":{"verify":"npm run verify:ios && npm run verify:android && npm run verify:web","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:android":"cd android && ./gradlew clean build test && cd ..","verify:web":"npm run build","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","eslint":"eslint . --ext ts","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","docgen":"docgen --api GyroscopePlugin --output-readme README.md --output-json dist/docs.json","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd ..","prepublishOnly":"npm run build"},"devDependencies":{"@capacitor/android":"8.0.0","@capacitor/cli":"8.4.2","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/ios":"8.0.0","@ionic/eslint-config":"0.4.0","eslint":"8.57.0","prettier-plugin-java":"2.9.7","rimraf":"6.1.2","rollup":"4.62.3","swiftlint":"2.0.0","typescript":"5.9.3"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"publishConfig":{"access":"public"},"gitHead":"7c1937ed10b7de86ca2c1cdc3539a2735fd69a00","_id":"@capawesome/capacitor-gyroscope@0.1.2","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-ze7tv2gG+jyP5dqUL4tdqKlob4DC2S9r0ddzTZE0/M8buEoe1NC9hC7MVA1VHxpu49S6vNCHhsWjkBFAgTj0iQ==","shasum":"ea3448e0cc0ace9f7ad741c389e79e13fe7ff3bc","tarball":"https://registry.npmjs.org/@capawesome/capacitor-gyroscope/-/capacitor-gyroscope-0.1.2.tgz","fileCount":38,"unpackedSize":97127,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-gyroscope@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDLze6yTsGawJZkVq+6VYA9PRBkiMA9pJMH31AvQmJOAAIgQsY6ypyOmfa6yUlZiZmA/Qj3XeBIGJY2c9L5Mu9J5og="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:37233605-dba3-4cf9-9597-46b1431220d3"}},"directories":{},"maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/capacitor-gyroscope_0.1.2_1788337349147_0.5290417250188062"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-07T06:20:54.218Z","modified":"2026-09-02T08:22:29.792Z","0.0.1":"2026-07-07T06:20:54.643Z","0.1.0":"2026-07-14T07:51:58.363Z","0.1.1":"2026-07-15T08:09:32.291Z","0.1.2":"2026-09-02T08:22:29.279Z"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","homepage":"https://capawesome.io/docs/sdks/capacitor/gyroscope/","keywords":["capacitor","plugin","native","capacitor-plugin","gyroscope","gyro","rotation rate","motion sensor","device motion","angular velocity"],"repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-plugins.git"},"description":"Capacitor plugin to read the device's gyroscope sensor on Android and iOS.","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"readme":"# Capacitor Gyroscope Plugin\n\nCapacitor plugin to read the device's gyroscope sensor.\n\n<div class=\"capawesome-z29o10a\">\n  <a href=\"https://cloud.capawesome.io/\" target=\"_blank\">\n    <img alt=\"Deliver Live Updates to your Capacitor app with Capawesome Cloud\" src=\"https://cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.png?t=1\" />\n  </a>\n</div>\n\n## Features\n\nThe Capacitor Gyroscope plugin is one of the most complete motion sensing solutions for Capacitor apps. Here are some of the key features:\n\n- 🖥️ **Cross-platform**: Supports Android and iOS.\n- ⚡ **Real-time measurements**: Continuous gyroscope data with event listeners.\n- 📊 **Rotation rate**: Accurate x, y, and z-axis rotation rate in rad/s.\n- 🔒 **Permission handling**: Built-in permission management for sensor access.\n- 🤝 **Compatibility**: Works alongside the [Accelerometer](https://capawesome.io/docs/sdks/capacitor/accelerometer/), [Barometer](https://capawesome.io/docs/sdks/capacitor/barometer/) and [Pedometer](https://capawesome.io/docs/sdks/capacitor/pedometer/) plugins.\n- 📦 **CocoaPods & SPM**: Supports CocoaPods and Swift Package Manager for iOS.\n- 🔁 **Up-to-date**: Always supports the latest Capacitor version.\n\nMissing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-plugins/issues) and we'll take a look!\n\n## Use Cases\n\nThe Gyroscope plugin is typically used whenever an app needs to react to the rotation of the device, for example:\n\n- **Motion-controlled games**: Use the real-time rotation rate to steer a character or vehicle by tilting the device.\n- **Immersive experiences**: Rotate 360° views or augmented reality scenes based on the device's rotation.\n- **Gesture detection**: Detect rotation gestures such as twisting the device to trigger actions in your app.\n- **Motion analysis**: Record the rotation rate around the x, y, and z axes to analyze movement patterns.\n\n## Compatibility\n\n| Plugin Version | Capacitor Version | Status         |\n| -------------- | ----------------- | -------------- |\n| 0.x.x          | >=8.x.x           | Active support |\n\n## Guides\n\n- [The Complete Guide to Capacitor Device Sensors](https://capawesome.io/blog/capacitor-device-sensors-guide/): How rotation data powers tilt-to-steer game mechanics and AR features together with the Accelerometer.\n\n## Installation\n\nYou can use our **AI-Assisted Setup** to install the plugin.\nAdd the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:\n\n```bash\nnpx skills add capawesome-team/skills --skill capacitor-plugins\n```\n\nThen use the following prompt:\n\n```\n Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome/capacitor-gyroscope` plugin in my project.\n```\n\nIf you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:\n\n```bash\nnpm install @capawesome/capacitor-gyroscope\nnpx cap sync\n```\n\n### Android\n\n#### Proguard\n\nIf you are using Proguard, you need to add the following rules to your `proguard-rules.pro` file:\n\n```\n-keep class io.capawesome.capacitorjs.plugins.** { *; }\n```\n\n### iOS\n\n#### Privacy Descriptions\n\nAdd the `NSMotionUsageDescription` key to the `ios/App/App/Info.plist` file, which tells the user why your app needs access to the device's motion data:\n\n```xml\n<key>NSMotionUsageDescription</key>\n<string>The app needs to access the motion activity.</string>\n```\n\n## Configuration\n\nNo configuration required for this plugin.\n\n## Usage\n\nThe following examples show how to check if the gyroscope is available, get a single measurement, receive continuous measurement updates, check and request permissions, and remove all listeners.\n\n### Check if the gyroscope is available\n\nCheck whether the device has a gyroscope sensor before using the other methods:\n\n```typescript\nimport { Gyroscope } from '@capawesome/capacitor-gyroscope';\n\nconst isAvailable = async () => {\n  const result = await Gyroscope.isAvailable();\n  return result.available;\n};\n```\n\n### Get a single measurement\n\nGet the most recent measurement from the gyroscope sensor. The rotation rate around the x, y, and z axes is reported in radians per second (rad/s):\n\n```typescript\nimport { Gyroscope } from '@capawesome/capacitor-gyroscope';\n\nconst getMeasurement = async () => {\n  const measurement = await Gyroscope.getMeasurement();\n  console.log('X: ', measurement.x);\n  console.log('Y: ', measurement.y);\n  console.log('Z: ', measurement.z);\n};\n```\n\n### Receive continuous measurement updates\n\nAdd a listener for the `measurement` event and start the measurement updates to receive the rotation rate in real time. The `measurement` event is only available on Android and iOS:\n\n```typescript\nimport { Gyroscope } from '@capawesome/capacitor-gyroscope';\n\nconst startMeasurementUpdates = async () => {\n  await Gyroscope.addListener('measurement', measurement => {\n    console.log('X: ', measurement.x);\n    console.log('Y: ', measurement.y);\n    console.log('Z: ', measurement.z);\n  });\n  await Gyroscope.startMeasurementUpdates();\n};\n\nconst stopMeasurementUpdates = async () => {\n  await Gyroscope.stopMeasurementUpdates();\n};\n```\n\n### Check and request permissions\n\nCheck and request the permission to access the gyroscope sensor:\n\n```typescript\nimport { Gyroscope } from '@capawesome/capacitor-gyroscope';\n\nconst checkPermissions = async () => {\n  const result = await Gyroscope.checkPermissions();\n  return result;\n};\n\nconst requestPermissions = async () => {\n  const result = await Gyroscope.requestPermissions();\n  return result;\n};\n```\n\n### Remove all listeners\n\nRemove all listeners when you no longer need them:\n\n```typescript\nimport { Gyroscope } from '@capawesome/capacitor-gyroscope';\n\nconst removeAllListeners = async () => {\n  await Gyroscope.removeAllListeners();\n};\n```\n\n## API\n\n<docgen-index>\n\n* [`checkPermissions()`](#checkpermissions)\n* [`getMeasurement()`](#getmeasurement)\n* [`isAvailable()`](#isavailable)\n* [`requestPermissions()`](#requestpermissions)\n* [`startMeasurementUpdates()`](#startmeasurementupdates)\n* [`stopMeasurementUpdates()`](#stopmeasurementupdates)\n* [`addListener('measurement', ...)`](#addlistenermeasurement-)\n* [`removeAllListeners()`](#removealllisteners)\n* [Interfaces](#interfaces)\n* [Type Aliases](#type-aliases)\n\n</docgen-index>\n\n<docgen-api>\n<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->\n\n### checkPermissions()\n\n```typescript\ncheckPermissions() => Promise<PermissionStatus>\n```\n\nCheck if the app has permission to access the gyroscope sensor.\n\n**Returns:** <code>Promise&lt;<a href=\"#permissionstatus\">PermissionStatus</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### getMeasurement()\n\n```typescript\ngetMeasurement() => Promise<GetMeasurementResult>\n```\n\nGet the latest measurement.\n\nThis method returns the most recent measurement from the gyroscope sensor.\n\n**Returns:** <code>Promise&lt;<a href=\"#measurement\">Measurement</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### isAvailable()\n\n```typescript\nisAvailable() => Promise<IsAvailableResult>\n```\n\nCheck if the gyroscope sensor is available on the device.\n\n**Returns:** <code>Promise&lt;<a href=\"#isavailableresult\">IsAvailableResult</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### requestPermissions()\n\n```typescript\nrequestPermissions() => Promise<PermissionStatus>\n```\n\nRequest permission to access the gyroscope sensor.\n\n**Returns:** <code>Promise&lt;<a href=\"#permissionstatus\">PermissionStatus</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### startMeasurementUpdates()\n\n```typescript\nstartMeasurementUpdates() => Promise<void>\n```\n\nStart emitting `measurement` events.\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### stopMeasurementUpdates()\n\n```typescript\nstopMeasurementUpdates() => Promise<void>\n```\n\nStop emitting `measurement` events.\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### addListener('measurement', ...)\n\n```typescript\naddListener(eventName: 'measurement', listenerFunc: (event: MeasurementEvent) => void) => Promise<PluginListenerHandle>\n```\n\nCalled when a new measurement is available.\n\nOnly available on Android and iOS.\n\n| Param              | Type                                                                    |\n| ------------------ | ----------------------------------------------------------------------- |\n| **`eventName`**    | <code>'measurement'</code>                                              |\n| **`listenerFunc`** | <code>(event: <a href=\"#measurement\">Measurement</a>) =&gt; void</code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### removeAllListeners()\n\n```typescript\nremoveAllListeners() => Promise<void>\n```\n\nRemove all listeners for this plugin.\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### Interfaces\n\n\n#### PermissionStatus\n\n| Prop            | Type                                                                          | Description                                    | Since |\n| --------------- | ----------------------------------------------------------------------------- | ---------------------------------------------- | ----- |\n| **`gyroscope`** | <code><a href=\"#gyroscopepermissionstate\">GyroscopePermissionState</a></code> | The permission status of the gyroscope sensor. | 0.1.0 |\n\n\n#### Measurement\n\n| Prop    | Type                | Description                                                        | Since |\n| ------- | ------------------- | ------------------------------------------------------------------ | ----- |\n| **`x`** | <code>number</code> | The rotation rate around the x-axis in radians per second (rad/s). | 0.1.0 |\n| **`y`** | <code>number</code> | The rotation rate around the y-axis in radians per second (rad/s). | 0.1.0 |\n| **`z`** | <code>number</code> | The rotation rate around the z-axis in radians per second (rad/s). | 0.1.0 |\n\n\n#### IsAvailableResult\n\n| Prop            | Type                 | Description                                              | Since |\n| --------------- | -------------------- | -------------------------------------------------------- | ----- |\n| **`available`** | <code>boolean</code> | Whether the gyroscope sensor is available on the device. | 0.1.0 |\n\n\n#### PluginListenerHandle\n\n| Prop         | Type                                      |\n| ------------ | ----------------------------------------- |\n| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |\n\n\n### Type Aliases\n\n\n#### GyroscopePermissionState\n\n<code><a href=\"#permissionstate\">PermissionState</a> | 'limited'</code>\n\n\n#### PermissionState\n\n<code>'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'</code>\n\n\n#### GetMeasurementResult\n\n<code><a href=\"#measurement\">Measurement</a></code>\n\n\n#### MeasurementEvent\n\n<code><a href=\"#measurement\">Measurement</a></code>\n\n</docgen-api>\n\n## FAQ\n\n### How is this plugin different from other similar plugins?\n\nIt delivers accurate x, y, and z-axis rotation rate in rad/s with both one-off readings via `getMeasurement()` and continuous real-time updates via the `measurement` event, plus built-in permission handling for sensor access on Android and iOS. The API is fully typed and actively maintained against the latest Capacitor and OS versions, and it pairs cleanly with our Accelerometer, Barometer, and Pedometer plugins so a single, consistent motion-sensing story is covered. If you only need an occasional reading, a simpler setup is perfectly fine; if you need continuous, low-level rotation data, this plugin is built for exactly that.\n\n### Which platforms does the plugin support?\n\nThe plugin supports Android and iOS. The continuous `measurement` event is only emitted on Android and iOS, so there is no gyroscope support in the browser.\n\n### What units are the measurements reported in?\n\nEach measurement contains the rotation rate around the x, y, and z axes in radians per second (rad/s).\n\n### What is the difference between `getMeasurement` and the `measurement` event?\n\nThe `getMeasurement()` method returns the most recent measurement from the gyroscope sensor once. If you need continuous real-time updates instead, add a listener for the `measurement` event and call `startMeasurementUpdates()`. Call `stopMeasurementUpdates()` when you no longer need updates.\n\n### Do I need any permissions to read the gyroscope?\n\nThe plugin provides the `checkPermissions()` and `requestPermissions()` methods to manage access to the gyroscope sensor. On iOS, you also have to add the `NSMotionUsageDescription` key to your `Info.plist` file, which tells the user why your app needs access to the device's motion data (see [Installation](#installation)).\n\n### How do I know if the device has a gyroscope sensor?\n\nCall the `isAvailable()` method. It returns whether the gyroscope sensor is available on the device, so you can hide or disable motion features on devices without a gyroscope.\n\n### Can I use this plugin with Ionic, React, Vue or Angular?\n\nYes, the plugin is framework-agnostic. It works in any Capacitor app regardless of the web framework, including Ionic with Angular, React, or Vue, as well as plain JavaScript projects.\n\n## Related Plugins\n\n- [Accelerometer](https://capawesome.io/docs/sdks/capacitor/accelerometer/): Capture the acceleration force along the x, y, and z axes.\n- [Barometer](https://capawesome.io/docs/sdks/capacitor/barometer/): Obtain the static air pressure measured in hectopascals (hPa).\n- [Compass](https://capawesome.io/docs/sdks/capacitor/compass/): Read the device compass heading.\n- [Pedometer](https://capawesome.io/docs/sdks/capacitor/pedometer/): Retrieve motion data such as the number of steps and the distance traveled.\n\n## Newsletter\n\nStay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).\n\n## Changelog\n\nSee [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/gyroscope/CHANGELOG.md).\n\n## License\n\nSee [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/gyroscope/LICENSE).\n","readmeFilename":"README.md"}