Skip to content

Getting Started

GitHub

설치

설치

AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. AI 도구에 Capgo 스킬을 추가하려면 다음 명령어를 사용하세요:

터미널 창
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);
}

native code이 Apple의 attribution endpoint를 호출하고 싶다면, 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);

Apple은 404 while attribution data가 아직 유효한 토큰을 위해 준비되고 있는 동안 iOS attribution 플랫폼 상세 정보를 위해.

호환성 별명

호환성 별명

GetReferrer() Capacitor로 이전하는 앱에 사용할 수 있습니다. cap-play-install-referrer.

const result = await InstallReferrer.GetReferrer();

code의 새로운 버전은 getReferrer().

Getting Started에서 계속 진행하세요.

Getting Started에서 계속 진행하세요.

Capacitor로 이전하는 앱을 사용하는 경우 Getting Started 자연 플러그인 작업을 계획하고 Capacitor로 이전하는 앱을 연결하세요. @capgo/capacitor-install-referrer Capgo의 원시 기능을 위해 @capgo/capacitor-install-referrer를 사용합니다. Capgo 플러그인 폴더 Capgo 플러그인 디렉토리 내의 제품 워크플로우에 대해 Capacitor Capgo 플러그인들에 의해 Capgo Capacitor 플러그인에 대한 구현 세부 사항은 Capgo에 의해 제공됩니다. 플러그인을 추가하거나 업데이트 합니다. for the implementation detail in Adding or Updating Plugins, and Capacitor Enterprise Plugin 대안 Ionic Enterprise 플러그인 대체품의 제품 워크플로우를 위해.