开始使用
复制一个包含安装步骤和本插件的完整 Markdown 指南的配置提示。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-autofill-save-password`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/autofill-save-password/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
安装
安装bun add @capgo/capacitor-autofill-save-passwordbunx cap sync导入
导入import { SavePassword } from '@capgo/capacitor-autofill-save-password';API概述
API概述promptDialog
提示对话框保存密码到钥匙串。
import { SavePassword } from '@capgo/capacitor-autofill-save-password';
await SavePassword.promptDialog({ username: 'your-username', password: 'your-password'});readPassword
标题:读取密码从钥匙串中读取密码。需要开发者为 iOS 应用设置关联域。
import { SavePassword } from '@capgo/capacitor-autofill-save-password';
await SavePassword.readPassword();类型参考
标题:类型参考Options
标题:选项export interface Options { /** * The username to save. */ username: string; /** * The password to save. */ password: string; /** * The url to save the password for. (For example: "console.capgo.app") * iOS only. */ url?: string;}ReadPasswordResult
标题:读取密码结果export interface ReadPasswordResult { /** * The username of the password. */ username: string; /** * The password of the password. */ password: string;}真实来源
标题:真实来源本页面由插件生成 src/definitions.ts当上游的公共API发生变化时,请重新同步。