开始使用
复制一个包含安装步骤和此插件的完整 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 syncimport { NativeMarket } from '@capgo/native-market';API概述
标题:API概述openStoreListing
标题:openStoreListing在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
标题:openDevPage直接深度链接到Play Store中的开发者页面。 仅限Android。
import { NativeMarket } from '@capgo/native-market';
await NativeMarket.openDevPage({ devId: 'Google+LLC'});openCollection
标题:openCollection将用户链接到Play Store中的收藏或热门榜。 仅限Android。
import { NativeMarket } from '@capgo/native-market';
await NativeMarket.openCollection({ name: 'featured'});openEditorChoicePage
Section titled “openEditorChoicePage”Link users to Editor’s choice page in the Google Play 商店。 仅限 Android。
import { NativeMarket } from '@capgo/native-market';
await NativeMarket.openEditorChoicePage({ editorChoice: 'editorial_fitness_apps_us'});search
Section titled “search”在 Google Play 商店中使用自定义搜索词进行搜索。 仅限 Android。
import { NativeMarket } from '@capgo/native-market';
await NativeMarket.search({ terms: 'fitness apps'});本页面是由插件生成的。
重新同步公共 __CAPGO_KEEP_0__ 时,请重新运行同步。 src/definitions.ts. Re-run the sync when the public API changes upstream.