开始使用
复制一个包含安装步骤和本插件的完整 Markdown 指南的配置提示。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/native-market`
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/native-market/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/native-marketbunx cap sync导入
标题:导入import { NativeMarket } from '@capgo/native-market';API 介绍
标题:API 介绍openStoreListing
打开应用商店列表页面(Android:Play Store,iOS:App Store)在 Play Store(Android)或 App Store(iOS)中启动应用列表页面。
import { NativeMarket } from '@capgo/native-market';
// Open app in storeawait NativeMarket.openStoreListing({ appId: 'com.example.app'});
// Open app in specific country store (iOS only)await NativeMarket.openStoreListing({ appId: 'com.example.app', country: 'IT'});openDevPage
标题:打开开发者页面深度链接到开发者在 Play Store 的页面。 仅限 Android。
import { NativeMarket } from '@capgo/native-market';
await NativeMarket.openDevPage({ devId: 'Google+LLC'});openCollection
标题:打开收藏将用户链接到 Play Store 的收藏或顶级排行榜。 仅限 Android。
import { NativeMarket } from '@capgo/native-market';
await NativeMarket.openCollection({ name: 'featured'});openEditorChoicePage
标题:打开编辑推荐页面将用户链接到 Play Store 的编辑推荐页面。 仅限 Android。
import { NativeMarket } from '@capgo/native-market';
await NativeMarket.openEditorChoicePage({ editorChoice: 'editorial_fitness_apps_us'});search
标题:搜索使用自定义搜索词在 Play Store 中搜索。 仅限 Android。
import { NativeMarket } from '@capgo/native-market';
await NativeMarket.search({ terms: 'fitness apps'});真实来源
标题:真实来源本页面由插件生成 src/definitions.ts当公共API上游发生变化时,请重新同步