Getting Started
复制一个包含安装步骤和完整 Markdown 指南的配置提示。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-home-indicator`, `@capgo/home-indicator`
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/home-indicator/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.
您可以使用我们的AI辅助安装程序来安装插件。使用以下命令将Capgo技能添加到您的AI工具中:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins然后使用以下提示:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-home-indicator` plugin in my project.如果您更喜欢手动安装,请运行以下命令并按照以下平台特定的说明进行操作:
bun add @capgo/capacitor-home-indicatorbunx cap syncimport { HomeIndicator } from '@capgo/capacitor-home-indicator';API 简介
标题:API 简介hide
标题:隐藏隐藏 iOS 屏幕底部的指示器
这会使 iOS 的指示器栏不可见,提供更沉浸式的全屏体验。用户仍然可以通过滑动上方来访问主屏幕,但直到他们开始滑动动作,指示器才会显示。
仅适用于 iOS。对 Android 或 web 无效。
import { HomeIndicator } from '@capgo/capacitor-home-indicator';
await HomeIndicator.hide();show
标题:显示显示 iOS 屏幕底部的指示器
这会恢复 iOS 的指示器的默认可见性,使其始终对用户可见。这是默认行为。
仅适用于 iOS。对 Android 或 web 无效。
import { HomeIndicator } from '@capgo/capacitor-home-indicator';
await HomeIndicator.show();isHidden
Section titled “isHidden”检测当前主屏幕指示器是否隐藏
iOS 主屏幕指示器的当前可见性状态
import { HomeIndicator } from '@capgo/capacitor-home-indicator';
const { hidden } = await HomeIndicator.isHidden();if (hidden) { console.log('Home indicator is hidden');} else { console.log('Home indicator is visible');}此页面是根据插件的 src/definitions.ts重新运行同步时,公共 API 上游发生变化时
继续从 Getting Started
Section titled “继续从 Getting Started”如果您正在使用 Getting Started 为计划仪表板和API操作,连接它 使用@capgo/capacitor-home-indicator 使用@capgo/capacitor-home-indicator中的本地能力 API概述 API概述中的实现细节 介绍 介绍中的实现细节 API密钥 API密钥中的实现细节 设备 设备中的实现细节