跳过内容

开始使用

终端窗口
bun add @capgo/native-market
bunx cap sync
import { NativeMarket } from '@capgo/native-market';

在 Play Store(Android)或 App Store(iOS)中启动应用列表页面。

import { NativeMarket } from '@capgo/native-market';
// Open app in store
await NativeMarket.openStoreListing({
appId: 'com.example.app'
});
// Open app in specific country store (iOS only)
await NativeMarket.openStoreListing({
appId: 'com.example.app',
country: 'IT'
});

深度链接到开发者在 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'
});

将用户链接到 Play Store 的编辑推荐页面。 仅限 Android。

import { NativeMarket } from '@capgo/native-market';
await NativeMarket.openEditorChoicePage({
editorChoice: 'editorial_fitness_apps_us'
});

使用自定义搜索词在 Play Store 中搜索。 仅限 Android。

import { NativeMarket } from '@capgo/native-market';
await NativeMarket.search({
terms: 'fitness apps'
});

本页面由插件生成 src/definitions.ts当公共API上游发生变化时,请重新同步