Skip to content

Getting Started

GitHub

CapgoのAIアシストセットアップを使用してプラグインをインストールできます。次のコマンドを使用して、CapgoスキルをAIツールに追加してください:

ターミナル画面
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

次のプロンプトを使用してください:

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

Manual Setupを使用する場合は、以下のコマンドを実行して、下記のプラットフォーム固有の指示に従ってください。

ターミナル画面
bun add @capgo/capacitor-install-referrer
bunx cap sync
import { InstallReferrer } from '@capgo/capacitor-install-referrer';
const result = await InstallReferrer.getReferrer();
if (result.platform === 'android') {
console.log('Install referrer:', result.referrer);
console.log('Click timestamp:', result.clickTimestampSeconds);
console.log('Install timestamp:', result.installBeginTimestampSeconds);
}
if (result.platform === 'ios') {
console.log('AdServices token:', result.attributionToken);
}

codeのネイティブをAppleのAttributionエンドポイントを呼び出すには、有効なトークンに対してAttributionデータが準備されている間、Appleが返すことができます。 fetchAppleAttribution.

const result = await InstallReferrer.getReferrer({
fetchAppleAttribution: true,
appleAttributionRetryCount: 3,
appleAttributionRetryDelayMs: 5000,
});
// result.appleAttribution is the parsed Apple attribution response.
// See the iOS attribution page for the Apple-provided payload fields.
console.log(result.appleAttribution);

有効なトークンに対してAttributionデータが準備されている間、Appleが返すことができます。 404 ネイティブ プラグインは、Attributionデータが準備されている間、有効なトークンに対してAppleが返すことができるまで、リトライオプションを制御します。 iOS Attribution iOS Attribution

GetReferrer() はアプリケーションをから移行するために利用できます。 cap-play-install-referrer.

const result = await InstallReferrer.GetReferrer();

新しいcodeを使用する場合 getReferrer().

が「から始めて続けてください」を使用している場合 から始めて を使用してネイティブ プラグインの作業を計画する場合、を接続してください。 Using @capgo/capacitor-install-referrer for the native capability in Using @capgo/capacitor-install-referrer, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, プラグインの追加または更新 プラグインの実装詳細については、プラグインの追加または更新、 Ionic エンタープライズ プラグインの代替 Ionic エンタープライズ プラグインの製品ワークフローについて