{"_id":"@crowdhub/cordova-plugin-age-verification","_rev":"5-3115555ef28594fe40a6b487e169865d","name":"@crowdhub/cordova-plugin-age-verification","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.1":{"name":"@crowdhub/cordova-plugin-age-verification","version":"0.0.1","keywords":["ecosystem:cordova","cordova-android","cordova-ios","age-verification","age-assurance","age-signals","declared-age-range","age-gate","compliance","kids","parental-controls"],"author":{"name":"CrowdHub","email":"austini@crowdhubapps.com"},"license":"MIT","_id":"@crowdhub/cordova-plugin-age-verification@0.0.1","maintainers":[{"name":"chtyrone","email":"tyson@crowdhubapps.com"},{"name":"ajisakson","email":"austinjisakson@gmail.com"}],"homepage":"https://github.com/CrowdhubApps/cordova-plugin-age-verification#readme","bugs":{"url":"https://github.com/CrowdhubApps/cordova-plugin-age-verification/issues"},"dist":{"shasum":"a653d1a132d1d6c348811be1a89ca0db03d516eb","tarball":"https://registry.npmjs.org/@crowdhub/cordova-plugin-age-verification/-/cordova-plugin-age-verification-0.0.1.tgz","fileCount":8,"integrity":"sha512-QZOW4wh8Y2/KkZdlPTL6hLspSgqe3pMXt9IgLaMEHZh1TfsrJAo5lraoi3EVwvtt4mrMo7AAhCCRaQfsaX2AHQ==","signatures":[{"sig":"MEUCIQD+Jl2WhxLU+v3CNrPDvuvMn7vtKCPRQfssw9GsCFCViAIgX7gWrky2sU+Dv3bpDpwazsq4Ucjta14uXR2U+XajwLU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31683},"main":"www/AgeVerification.js","types":"types/index.d.ts","cordova":{"id":"@crowdhub/cordova-plugin-age-verification","platforms":["android","ios"]},"engines":[{"name":"cordova","version":">=10.0.0"}],"gitHead":"279498a2a75718f872b9412d682b9987121dc1b9","_npmUser":{"name":"ajisakson","email":"austinjisakson@gmail.com"},"repository":{"url":"git+https://github.com/CrowdhubApps/cordova-plugin-age-verification.git","type":"git"},"_npmVersion":"11.13.0","description":"Cordova plugin for privacy-preserving age assurance using the Google Play Age Signals API (Android/Kotlin) and the Apple Declared Age Range API (iOS/Swift). Exposes a unified, Promise-based JavaScript API with TypeScript definitions.","directories":{},"_nodeVersion":"24.2.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cordova-plugin-age-verification_0.0.1_1781040568760_0.6789615734848642","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@crowdhub/cordova-plugin-age-verification","version":"0.0.2","keywords":["ecosystem:cordova","cordova-android","cordova-ios","age-verification","age-assurance","age-signals","declared-age-range","age-gate","compliance","kids","parental-controls"],"author":{"name":"CrowdHub","email":"austini@crowdhubapps.com"},"license":"MIT","_id":"@crowdhub/cordova-plugin-age-verification@0.0.2","maintainers":[{"name":"chtyrone","email":"tyson@crowdhubapps.com"},{"name":"ajisakson","email":"austinjisakson@gmail.com"}],"homepage":"https://github.com/CrowdhubApps/cordova-plugin-age-verification#readme","bugs":{"url":"https://github.com/CrowdhubApps/cordova-plugin-age-verification/issues"},"dist":{"shasum":"3bfd4668d1f4767f6752076ab44f81688fdc7cb2","tarball":"https://registry.npmjs.org/@crowdhub/cordova-plugin-age-verification/-/cordova-plugin-age-verification-0.0.2.tgz","fileCount":8,"integrity":"sha512-CTH1FM+Z1F/6vXd/KPfg6flDnL1Tsb8AJJ82ofIaJMXkbFio5Vnol8pj/1sNPKn3klKzUXepKTPESb5nLItxVQ==","signatures":[{"sig":"MEQCIEMGoc1c7nQ3VKAlOgiBjSUDJYUv5xT6Gkw8YOSTrgLOAiBo5u7z5pCfZsSbz2vlktHxF/r00k/H1gqWtak9vUX4hw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@crowdhub%2fcordova-plugin-age-verification@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":31683},"main":"www/AgeVerification.js","types":"types/index.d.ts","cordova":{"id":"@crowdhub/cordova-plugin-age-verification","platforms":["android","ios"]},"engines":[{"name":"cordova","version":">=10.0.0"}],"gitHead":"980bfa3aafd75b3aff34732bb590ca04af461d1f","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0f3f1263-7356-4f1b-853e-b83561cb222c"}},"repository":{"url":"git+https://github.com/CrowdhubApps/cordova-plugin-age-verification.git","type":"git"},"_npmVersion":"11.16.0","description":"Cordova plugin for privacy-preserving age assurance using the Google Play Age Signals API (Android/Kotlin) and the Apple Declared Age Range API (iOS/Swift). Exposes a unified, Promise-based JavaScript API with TypeScript definitions.","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cordova-plugin-age-verification_0.0.2_1781041092321_0.06452854372508066","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@crowdhub/cordova-plugin-age-verification","version":"0.0.3","keywords":["ecosystem:cordova","cordova-android","cordova-ios","age-verification","age-assurance","age-signals","declared-age-range","age-gate","compliance","kids","parental-controls"],"author":{"name":"CrowdHub","email":"austini@crowdhubapps.com"},"license":"MIT","_id":"@crowdhub/cordova-plugin-age-verification@0.0.3","maintainers":[{"name":"chtyrone","email":"tyson@crowdhubapps.com"},{"name":"ajisakson","email":"austinjisakson@gmail.com"}],"homepage":"https://github.com/CrowdhubApps/cordova-plugin-age-verification#readme","bugs":{"url":"https://github.com/CrowdhubApps/cordova-plugin-age-verification/issues"},"dist":{"shasum":"aa9e10964ee04746e11d1dfd590535cf29475a07","tarball":"https://registry.npmjs.org/@crowdhub/cordova-plugin-age-verification/-/cordova-plugin-age-verification-0.0.3.tgz","fileCount":8,"integrity":"sha512-OaO47if2+p0UeUBbw8nCdSdE72IVqtdJOP7xmIRgwhENB7WhASsu9dVRPFvJ3eVCRU9UGRX4K8820pihE56ddA==","signatures":[{"sig":"MEUCICG7glTe8DiAXVT9XarFFbrSbobc6kgB2s9egZRKREZ+AiEAl/MreDX6FMO5KRBd+5vc2zplzT0tUkNqFVnJcrdqLX4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@crowdhub%2fcordova-plugin-age-verification@0.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":31911},"main":"www/AgeVerification.js","types":"types/index.d.ts","cordova":{"id":"@crowdhub/cordova-plugin-age-verification","platforms":["android","ios"]},"engines":[{"name":"cordova","version":">=10.0.0"}],"gitHead":"8d49fca5bf45e2b5327d2458747916a041d260ac","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0f3f1263-7356-4f1b-853e-b83561cb222c"}},"repository":{"url":"git+https://github.com/CrowdhubApps/cordova-plugin-age-verification.git","type":"git"},"_npmVersion":"11.16.0","description":"Cordova plugin for privacy-preserving age assurance using the Google Play Age Signals API (Android/Kotlin) and the Apple Declared Age Range API (iOS/Swift). Exposes a unified, Promise-based JavaScript API with TypeScript definitions.","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cordova-plugin-age-verification_0.0.3_1781041690985_0.4698197959584933","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@crowdhub/cordova-plugin-age-verification","version":"0.0.4","keywords":["ecosystem:cordova","cordova-android","cordova-ios","age-verification","age-assurance","age-signals","declared-age-range","age-gate","compliance","kids","parental-controls"],"author":{"name":"CrowdHub","email":"austini@crowdhubapps.com"},"license":"MIT","_id":"@crowdhub/cordova-plugin-age-verification@0.0.4","maintainers":[{"name":"chtyrone","email":"tyson@crowdhubapps.com"},{"name":"ajisakson","email":"austinjisakson@gmail.com"}],"homepage":"https://github.com/CrowdhubApps/cordova-plugin-age-verification#readme","bugs":{"url":"https://github.com/CrowdhubApps/cordova-plugin-age-verification/issues"},"dist":{"shasum":"6666eea0bb216c52b3890fe9d374f775c3721f91","tarball":"https://registry.npmjs.org/@crowdhub/cordova-plugin-age-verification/-/cordova-plugin-age-verification-0.0.4.tgz","fileCount":8,"integrity":"sha512-livSkgLzDcWSVhwiWZi+cjvpRe8qGFQpLUys8IhEBYAIVeCOJpPqIjpjN91VGSi3zdkIpZOP1pHS+486c6Tv3Q==","signatures":[{"sig":"MEUCIQDZmuVh7PvSmhhdCVP8K9tI2Q6d3J2xyCeiOYxokySPRgIgYC/BDaovdHRO7bD/qcvll1K0YNw9B89R3ZcB+sSLTp0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@crowdhub%2fcordova-plugin-age-verification@0.0.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":32196},"main":"www/AgeVerification.js","types":"types/index.d.ts","cordova":{"id":"@crowdhub/cordova-plugin-age-verification","platforms":["android","ios"]},"engines":[{"name":"cordova","version":">=10.0.0"}],"gitHead":"d40d4c60220059161b3537bafed97953e3255d68","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0f3f1263-7356-4f1b-853e-b83561cb222c"}},"repository":{"url":"git+https://github.com/CrowdhubApps/cordova-plugin-age-verification.git","type":"git"},"_npmVersion":"11.16.0","description":"Cordova plugin for privacy-preserving age assurance using the Google Play Age Signals API (Android/Kotlin) and the Apple Declared Age Range API (iOS/Swift). Exposes a unified, Promise-based JavaScript API with TypeScript definitions.","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cordova-plugin-age-verification_0.0.4_1781042276484_0.9728140632851408","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@crowdhub/cordova-plugin-age-verification","version":"0.0.5","description":"Cordova plugin for privacy-preserving age assurance using the Google Play Age Signals API (Android/Kotlin) and the Apple Declared Age Range API (iOS/Swift). Exposes a unified, Promise-based JavaScript API with TypeScript definitions.","cordova":{"id":"@crowdhub/cordova-plugin-age-verification","platforms":["android","ios"]},"main":"www/AgeVerification.js","types":"types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/CrowdhubApps/cordova-plugin-age-verification.git"},"keywords":["ecosystem:cordova","cordova-android","cordova-ios","age-verification","age-assurance","age-signals","declared-age-range","age-gate","compliance","kids","parental-controls"],"author":{"name":"CrowdHub","email":"austini@crowdhubapps.com"},"license":"MIT","bugs":{"url":"https://github.com/CrowdhubApps/cordova-plugin-age-verification/issues"},"homepage":"https://github.com/CrowdhubApps/cordova-plugin-age-verification#readme","engines":[{"name":"cordova","version":">=10.0.0"}],"publishConfig":{"access":"public"},"gitHead":"cd15ee72cf5d1e3f9a7b542f38c8329735c19474","_id":"@crowdhub/cordova-plugin-age-verification@0.0.5","_nodeVersion":"24.16.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-5ebHGMYWLVM36AntLA/MX4T68IHVNY1zE56BR1AVl7qPiZY0s61KbU2j9r4NqZ/rSIBg26qb54YlpG+9+3J43w==","shasum":"abf5e9400323e3f56880b9ec999b01f98e10ec3f","tarball":"https://registry.npmjs.org/@crowdhub/cordova-plugin-age-verification/-/cordova-plugin-age-verification-0.0.5.tgz","fileCount":8,"unpackedSize":32084,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@crowdhub%2fcordova-plugin-age-verification@0.0.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCPjHHcBR8AIWbs/n+vD0BklZJaPOasGfjY2zspwPUzFQIhAKE3X8BmAFmaloertrcYAn40bCXHh9MgKHyHEwxRpIvt"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0f3f1263-7356-4f1b-853e-b83561cb222c"}},"directories":{},"maintainers":[{"name":"chtyrone","email":"tyson@crowdhubapps.com"},{"name":"ajisakson","email":"austinjisakson@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cordova-plugin-age-verification_0.0.5_1781043884377_0.2852355452360251"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-09T21:29:28.658Z","modified":"2026-06-09T22:24:44.832Z","0.0.1":"2026-06-09T21:29:28.917Z","0.0.2":"2026-06-09T21:38:12.476Z","0.0.3":"2026-06-09T21:48:11.154Z","0.0.4":"2026-06-09T21:57:56.670Z","0.0.5":"2026-06-09T22:24:44.513Z"},"bugs":{"url":"https://github.com/CrowdhubApps/cordova-plugin-age-verification/issues"},"author":{"name":"CrowdHub","email":"austini@crowdhubapps.com"},"license":"MIT","homepage":"https://github.com/CrowdhubApps/cordova-plugin-age-verification#readme","keywords":["ecosystem:cordova","cordova-android","cordova-ios","age-verification","age-assurance","age-signals","declared-age-range","age-gate","compliance","kids","parental-controls"],"repository":{"type":"git","url":"git+https://github.com/CrowdhubApps/cordova-plugin-age-verification.git"},"description":"Cordova plugin for privacy-preserving age assurance using the Google Play Age Signals API (Android/Kotlin) and the Apple Declared Age Range API (iOS/Swift). Exposes a unified, Promise-based JavaScript API with TypeScript definitions.","maintainers":[{"name":"chtyrone","email":"tyson@crowdhubapps.com"},{"name":"ajisakson","email":"austinjisakson@gmail.com"}],"readme":"# @crowdhub/cordova-plugin-age-verification\n\nPrivacy-preserving **age assurance** for Cordova apps. One Promise-based\nJavaScript API (with TypeScript definitions) over the two native platform APIs:\n\n| Platform | Native API | Language |\n| --- | --- | --- |\n| Android | [Google Play Age Signals API](https://developer.android.com/google/play/age-signals/overview) | Kotlin |\n| iOS | [Apple Declared Age Range API](https://developer.apple.com/documentation/declaredagerange/) | Swift |\n\nBoth native layers normalize their platform-specific responses into a single\n[`AgeRangeResult`](types/index.d.ts) shape so your app can treat them uniformly.\n\n## Installation\n\n```sh\ncordova plugin add @crowdhub/cordova-plugin-age-verification\n```\n\nThe package is published to the CrowdHub npm scope (`@crowdhub`).\n\n## Requirements\n\n### Android\n- `minSdkVersion` **23** or higher, plus AndroidX and Kotlin enabled — set all\n  three in your app's `config.xml`:\n  ```xml\n  <preference name=\"android-minSdkVersion\" value=\"23\" />\n  <preference name=\"AndroidXEnabled\" value=\"true\" />\n  <preference name=\"GradlePluginKotlinEnabled\" value=\"true\" />\n  ```\n- The Age Signals API only returns data on installs **updated by Google Play**,\n  and only for users in regions where age data is legally required. Enroll your\n  app in the **Play Console** and configure your age bands there.\n- Pairing with the [Play Integrity API](https://developer.android.com/google/play/integrity)\n  is recommended to ensure calls come from a genuine app.\n\n### iOS\n- **iOS 26.0+** at runtime; build with the **iOS 26.2 SDK / Xcode 26.2** or later.\n- Enable the **Declared Age Range** capability on your App ID in the Apple\n  Developer portal. The plugin adds the `com.apple.developer.declared-age-range`\n  entitlement to your build automatically.\n- The Swift bridge is wired up via `cordova-plugin-add-swift-support`.\n\n## Usage\n\n```js\ndocument.addEventListener('deviceready', async () => {\n  const ageVerification = cordova.plugins.ageVerification;\n\n  // Optional: check availability first.\n  const { supported } = await ageVerification.isSupported();\n  if (!supported) return;\n\n  try {\n    const result = await ageVerification.requestAgeRange({ ageGates: [13, 16, 18] });\n\n    if (!result.available) {\n      // No age data (declined, unknown region, unsupported OS). Apply your\n      // most restrictive default experience.\n      return;\n    }\n\n    const lower = result.lowerBound ?? 0;\n    if (lower >= 18) {\n      // adult experience\n    } else if (lower >= 16) {\n      // 16–17 experience\n    } else {\n      // restricted experience\n    }\n  } catch (err) {\n    console.error('Age request failed', err);\n  }\n});\n```\n\n### TypeScript\n\n```ts\nimport type { AgeRangeResult } from '@crowdhub/cordova-plugin-age-verification';\n\nconst result: AgeRangeResult = await cordova.plugins.ageVerification.requestAgeRange();\n```\n\n## API\n\n### `requestAgeRange(options?): Promise<AgeRangeResult>`\n\n| Option | Type | Default | Notes |\n| --- | --- | --- | --- |\n| `ageGates` | `number \\| number[]` | `[18]` | Age thresholds the app cares about. Used directly by iOS (up to three values). **Ignored on Android**, which returns its own Play Console-configured age bands. |\n\nResolves with an [`AgeRangeResult`](types/index.d.ts):\n\n```ts\ninterface AgeRangeResult {\n  platform: 'android' | 'ios';\n  available: boolean;                 // true when usable age data was provided\n  status: AgeAssuranceStatus;         // normalized status (see below)\n  lowerBound: number | null;          // inclusive lower bound, or null\n  upperBound: number | null;          // inclusive upper bound, or null\n  declaration: 'selfDeclared' | 'guardianDeclared' | 'confirmed' | null;\n  raw: AndroidAgeSignals | IosAgeRange; // platform-specific payload\n}\n```\n\n**Normalized `status` values**\n\n| Status | Source | Meaning |\n| --- | --- | --- |\n| `sharing` | iOS | User shared an age range. |\n| `declined` | iOS | User declined to share. |\n| `verified` | Android | Age verified (gov ID / payment / estimation). |\n| `supervised` | Android | Supervised account; age set by a guardian. |\n| `supervisedApprovalPending` | Android | Guardian approval pending. |\n| `supervisedApprovalDenied` | Android | Guardian denied approval. |\n| `declared` | Android | User declared their own age. |\n| `unknown` | Android | Not verified/supervised in an applicable region. |\n| `notAvailable` | both | No age data (OS/region/account or error). |\n\n### `isSupported(): Promise<{ supported: boolean; platform: string; reason?: string }>`\n\nReports whether age assurance is available on the current OS version.\n\n## How age data maps across platforms\n\n- **Android** never returns an exact age; it returns a coarse band\n  (`ageLower`/`ageUpper`) plus a verification status, and an `installId` you can\n  persist to handle revoked guardian approvals.\n- **iOS** never returns an exact age either; it returns bounds derived from the\n  `ageGates` you requested. Apple may override your gates based on the user's\n  region.\n\nUse age data only for age-appropriate compliance — not for advertising,\nmarketing, profiling, or analytics. This is a contractual requirement of both\nplatform APIs.\n\n## Releasing\n\nPublishing to npm is automated via GitHub Actions and triggered by **publishing a\nGitHub Release**:\n\n1. Bump `version` in `package.json` and `plugin.xml`, then commit to `main`.\n2. Create a GitHub Release whose tag matches that version (e.g. `v1.2.0`).\n3. The [publish workflow](.github/workflows/publish.yml) validates the package,\n   verifies the tag matches `package.json`, and runs\n   `npm publish --access public --provenance`.\n\nRequires an `NPM_TOKEN` repo secret with publish rights to the `@crowdhub` scope.\n\n## License\n\n[MIT](LICENSE) © CrowdHub\n","readmeFilename":"README.md"}