跳过内容

开始使用

终端窗口
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'
});

将用户链接到Play Store中的收藏或热门榜。 仅限Android。

import { NativeMarket } from '@capgo/native-market';
await NativeMarket.openCollection({
name: 'featured'
});

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'
});

在 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.