Skip to content

Latest commit

 

History

History
68 lines (42 loc) · 2.33 KB

File metadata and controls

68 lines (42 loc) · 2.33 KB

CLAUDE.md

Platform-Specific Context

For platform-specific patterns and gotchas, see:

Package Manager

Always use pnpm (not npm) and pnpm dlx (not npx).

Development Commands

Build the plugin:

  • pnpm build — Full production build with linting

Linting:

  • pnpm lint — Run all linters (TypeScript + Swift)
  • pnpm lint.ts — Run TypeScript linters only (use after editing TypeScript)
  • pnpm lint.swift — Run Swift linter only (use after editing Swift)

Platform Verification:

  • pnpm verify — Verify both iOS and Android builds
  • pnpm verify.ios — Verify iOS build only
  • pnpm verify.android — Verify Android build only

Plugin Platform Development:

  • pnpm open.ios — Open iOS project in Xcode
  • pnpm open.android — Open Android project in Android Studio

Release:

  • pnpm release — Create release (version bump, tag, update iOS and Android versions, changelog). Never manually update version numbers.

Demo Apps:

  • demo-pods/ — CocoaPods variant (primary)
  • demo-spm/ — SPM variant
  • demo-shared/ — Shared demo code

Demo scripts are prefixed with demo. (e.g., pnpm demo.dev, pnpm demo.ios).

Tooling Preferences

  • Use Serena's semantic tools for code exploration and symbol lookups:
    • jet_brains_find_symbol - Find symbol definitions
    • jet_brains_find_referencing_symbols - Find references
    • jet_brains_get_symbols_overview - Get symbol overviews
  • Do not use TypeScript LSP for symbol lookups

Project Architecture

This is a Capacitor plugin providing biometric authentication across web (simulated), iOS, and Android.

Cross-Platform Error Consistency

Error codes must match exactly across all three platforms (TypeScript, Swift, Java). The canonical list is in src/definitions.ts (BiometryErrorType enum). When adding or modifying error codes, update all three platforms.

Testing Strategy

  • No unit tests — This project relies on platform verification (pnpm verify) and real device testing via the demo apps
  • Web simulation: setBiometryType(), setBiometryIsEnrolled(), setDeviceIsSecure() for testing without hardware