Lompat ke konten utama
Kembali ke plugin
@capgo/pasar-alam-tertua
Tutorial
oleh github.com/Cap-go

Pasar Alam

Tautan dalam mendatangkan pengguna langsung ke halaman aplikasi Anda di Google Play Store atau Apple App Store

Petunjuk

Tutorial di Pasar Nativ

Menggunakan @capgo/native-market

Capacitor Plugin Pasar Nativ untuk membuka daftar dan halaman toko aplikasi.

Instal

bun add @capgo/native-market
bunx cap sync

Apa yang Dibuka oleh Plugin Ini

  • openStoreListing - Buka halaman daftar aplikasi di Play Store (Android) atau App Store (iOS).
  • openDevPage - Hubungkan langsung ke halaman pengembang di Play Store. Hanya Android.
  • openCollection - Hubungkan pengguna ke koleksi atau chart teratas di Play Store. Hanya Android.
  • openEditorChoicePage - Hubungkan pengguna ke halaman Editor's Choice di Play Store. Hanya untuk Android.

Contoh Penggunaan

openStoreListing

Buka halaman daftar aplikasi di Play Store (Android) atau 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'
});

openDevPage

Hubungkan langsung ke halaman pengembang di Play Store. Hanya untuk Android.

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

await NativeMarket.openDevPage({
  devId: 'Google+LLC'
});

openCollection

Hubungkan pengguna ke koleksi atau chart teratas di Play Store. Hanya untuk Android.

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

await NativeMarket.openCollection({
  name: 'featured'
});

openEditorChoicePage

Hubungkan pengguna ke halaman Editor's Choice di Play Store. Hanya untuk Android.

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

await NativeMarket.openEditorChoicePage({
  editorChoice: 'editorial_fitness_apps_us'
});

Referensi Lengkap