@capgo/capacitor-native-market

中文文档
8.0.57发布于 2026/11/09MPL-2.0TypeScriptESM + CJS零依赖构建来源已验证近 30 天下载 4.1万

A native market plugin for linking to google play or app store.

原始使用文档
文档目录18 节
  1. ➡️ Get started for free
  2. Key features
  3. Why Native Market?
  4. Maintainers
  5. Documentation
  6. Compatibility
  7. Installation
  8. Configuration
  9. Supported methods
  10. Usage
  11. API
  12. openStoreListing(...)
  13. openDevPage(...)
  14. openCollection(...)
  15. openEditorChoicePage(...)
  16. search(...)
  17. getPluginVersion()
  18. iOS Notes

Capacitor Native Market Plugin

Send users to your app's store page from your Capacitor app, to rate it, update it or discover your other apps on the App Store and Google Play.

Capgo - Build Capacitor apps with AI, ship updates instantly

Capgo: push fixes to your Capacitor users in minutes, build signed iOS and Android apps without a Mac, and roll back in one click.

➡️ Get started for free

14-day unlimited free trial. No credit card required

🤖 Building with an AI coding agent? Install Capgo skills so Claude Code, Codex, Cursor, Copilot, or Gemini CLI know how to install and use @capgo/capacitor-native-market in your Capacitor app: npx skills add Cap-go/capgo-skills. Then ask your agent: "Add @capgo/capacitor-native-market to my Capacitor app and wire it up." Agent setup guides · Hosted MCP

@capgo/capacitor-native-market for Capacitor apps

Key features

  • Store listing: openStoreListing() opens an app's page on the App Store or Google Play.
  • Search: search() opens a store search for your terms.
  • Developer page: openDevPage() on Google Play.
  • Collections: openCollection() and openEditorChoicePage() on Google Play.
  • Platforms: iOS and Android. Developer pages, collections and Editor's choice are Android only. Not available on web.

Why Native Market?

Deep-link your users directly to your app's store listing, developer page, or search results. Essential for:

  • Prompting app reviews - Direct users to leave ratings and reviews
  • Update notifications - Send users to download the latest version
  • Cross-promotion - Link to your other apps or developer page
  • Search visibility - Open store searches for specific terms

Simple, focused plugin that handles all the platform-specific store linking logic for you.

Maintainers

MaintainerGitHubSocialSponsoring Company
Martin Donadieuriderx@martindonadieu

Maintenance Status: Actively Maintained

Documentation

The most complete doc is available here: https://capgo.app/docs/plugins/native-market/

Compatibility

Plugin versionCapacitor compatibilityMaintained
v8.*.*v8.*.*✅
v7.*.*v7.*.*On demand
v6.*.*v6.*.*❌
v5.*.*v5.*.*❌

Note: The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.

Installation

You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:

npx skills add https://github.com/cap-go/capacitor-skills --skill capacitor-plugins

Then use the following prompt:

Use the `capacitor-plugins` skill from `cap-go/capacitor-skills` to install the `@capgo/capacitor-native-market` plugin in my project.

If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:

To use npm

npm install @capgo/capacitor-native-market

To use yarn

yarn add @capgo/capacitor-native-market

Sync native files

npx cap sync

iOS Platform: No further action required.

Android Platform: No further action required.

Configuration

No configuration required for this plugin

Supported methods

NameAndroidiOSWeb
openStoreListing✅✅❌
openDevPage✅❌❌
openCollection✅❌❌
openEditorChoicePage✅❌❌
search✅✅❌

Usage

import { NativeMarket } from '@capgo/capacitor-native-market';

/**
 * This method will launch link in Play/App Store.
 * @param appId - ID of your application. Eg. com.example.app
 * @param [country] - International country code if application is not published in the US App store (only for iOS). Eg. IT
 * @returns void
 */
NativeMarket.openStoreListing({
  appId: 'com.example.app',
  country: 'IT',
});

/**
 * This method will deep-link directly to an Play/App store listing page.
 * @param devId - ID of developer. Eg. com.example.app
 * @returns void
 */
NativeMarket.openDevPage({
  devId: '5700313618786177705',
});

/**
 * This method will link users to a collection or top charts.
 * @param name - name of the collection. Click [here](https://developer.android.com/distribute/marketing-tools/linking-to-google-play#OpeningCollection) for android options.
 * @returns void
 */
NativeMarket.openCollection({
  name: 'featured',
});

/**
 * This method will link users to Editor's choice page.
 * @param editorChoice - ID of your application. Eg. editorial_fitness_apps_us
 * @returns void
 */
NativeMarket.openEditorChoicePage({
  editorChoice: 'editorial_fitness_apps_us',
});

/**
 * This method will link users to custom search query.
 * @param editorChoice - terms to be searched in Play/App store.
 * @returns void
 */
NativeMarket.search({
  terms: 'capacitor',
});

API

Capacitor Native Market Plugin for opening app store listings and pages.

openStoreListing(...)

openStoreListing(options: { appId: string; country?: string; }) => Promise<void>

Launch app listing page in Play Store (Android) or App Store (iOS).

ParamTypeDescription
options{ appId: string; country?: string; }- Configuration for opening the store listing

Since: 1.0.0


openDevPage(...)

openDevPage(options: { devId: string; }) => Promise<void>

Deep-link directly to a developer's page in the Play Store. Android only.

ParamTypeDescription
options{ devId: string; }- Configuration with developer ID

Since: 1.0.0


openCollection(...)

openCollection(options: { name: string; }) => Promise<void>

Link users to a collection or top charts in the Play Store. Android only.

ParamTypeDescription
options{ name: string; }- Configuration with collection name

Since: 1.0.0


openEditorChoicePage(...)

openEditorChoicePage(options: { editorChoice: string; }) => Promise<void>

Link users to Editor's choice page in the Play Store. Android only.

ParamTypeDescription
options{ editorChoice: string; }- Configuration with editor choice ID

Since: 1.0.0


search(options: { terms: string; }) => Promise<void>

Search the Play Store with custom search terms. Android only.

ParamTypeDescription
options{ terms: string; }- Configuration with search terms

Since: 1.0.0


getPluginVersion()

getPluginVersion() => Promise<{ version: string; }>

Get the native Capacitor plugin version.

Returns: Promise<{ version: string; }>

Since: 1.0.0


iOS Notes

If your app is not published in the US App Store, you might not be able to find it. In this case you must specify country code for lookup search to work.

版本与发布记录

@capgo/capacitor-native-market 共发布 29 个版本,首次发布于 2026/05/28;过去 12 个月发布了 29 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
8.0.57latest2026/11/09今天
8.0.562026/11/026 天前
8.0.552026/10/2613 天前
8.0.542026/10/1920 天前
8.0.532026/10/1525 天前
8.0.522026/10/1327 天前

关于 @capgo/capacitor-native-market 的常见问题

@capgo/capacitor-native-market 是什么?

A native market plugin for linking to google play or app store.

如何安装 @capgo/capacitor-native-market?

在项目目录运行 npm install @capgo/capacitor-native-market,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@capacitor/core(>=8.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@capgo/capacitor-native-market 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@capgo/capacitor-native-market 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@capgo/capacitor-native-market 可以商用吗?

@capgo/capacitor-native-market 使用 MPL-2.0 许可。弱 Copyleft:可以商用,也可以和闭源代码一起使用;但如果分发时修改了 MPL 授权的文件,这些文件的修改需以 MPL 开源。以上为概括,不构成法律意见,请以许可原文为准。

@capgo/capacitor-native-market 的下载量有多少?

根据 npm 官方下载统计,@capgo/capacitor-native-market 在 2026/10/09 – 2026/11/07 这 30 天内被下载 41,080 次,日均约 1,369 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@capgo/capacitor-native-market 还在维护吗?

最新版本 8.0.57 发布于 2026/11/09(今天);至今共发布 29 个版本,其中过去 12 个月发布了 29 个;首次发布于 2026/05/28。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。