콘텐츠로 바로가기

iOS 구독 그룹 만들기

GitHub

iOS 앱에서 여러 구독 수준을 관리하고 조직하기 위한 구독 그룹이 중요합니다. 구독 그룹이 어떻게 작동하는지 이해하는 것은 업그레이드, 다운그레이드 및 크로스 그레이드 기능을 구현하는 데 필수적입니다.

구독 그룹이란 무엇인가?

구독 그룹이란 무엇인가?

구독 그룹은 사용자가 선택할 수 있는 관련된 구독의 집합입니다. 사용자는 한 그룹 내에서 한 번에 하나의 구독만 구독할 수 있습니다. 구독을 SWITCH 할 때 Apple은 자동으로 전환을 처리합니다.

구독 그룹의 중요성

구독 그룹이란 무엇인가?

구독 그룹은 다음을 가능하게합니다:

  • 가격 계층: 기본, 프리미엄, 및 최종 플랜 제공
  • 다양한 기간: 월, 년, 및 영구 옵션
  • 업그레이드/다운그레이드 논리: 구독 변경을 자동으로 처리
  • 간소화된 관리: 관련 구독을 그룹화

그룹 내에서 각 구독은 가치가 가장 높은 등급 (1 등급)부터 가치가 가장 낮은 등급까지_ranking_합니다. 이_ranking_은 구독 변경을 분류하는 데 사용됩니다.

구독 그룹 계층

레벨 1 (가장 높은 값)

  • 프리미엄 연간 ($99.99/년)
  • 최종 월 ($19.99/월)

레벨 2 (중간 값)

  • 표준 연간 ($49.99/년)
  • 프리미엄 월 ($9.99/월)

레벨 3 (가장 낮은 값)

  • 기본 연간 ($29.99/년)
  • 표준 월간 ($4.99/월)

구독 변경 유형

구독 변경 유형 섹션

애플은 등급 순위에 따라 3 가지 유형의 구독 변경을 자동으로 처리합니다.

1. 업그레이드

1. 업그레이드 섹션

상위 등급의 구독으로 이동 (예: 등급 2 → 등급 1). 행동: 적용 효과:

Takes effect

  • __CAPGO_KEEP_0__ 즉시
  • 사용자는 미사용 기간에 대한 잔여 기간에 대한
  • 새로운 구독이 즉시 시작됩니다.

예시:

// User currently has: Standard Monthly (Level 2)
// User upgrades to: Premium Annual (Level 1)
// Result: Immediate access to Premium, refund for unused Standard time

2. 구독 등급을 낮춥니다.

구독 등급을 낮추는 방법

하위 등급의 구독으로 이동하는 경우 (예: 등급 1 → 등급 2). 이동하여 낮은 등급

행동:

  • 효과가 시작되는 날짜: 다음 갱신일
  • 현재 구독을 유지합니다. 기간이 끝날 때까지
  • 구독이 만료된 후 자동으로 새로운 구독이 시작됩니다.

예시:

// User currently has: Premium Annual (Level 1)
// User downgrades to: Standard Monthly (Level 2)
// Result: Premium access continues until annual renewal date, then switches

3. Cross급

Cross급 섹션

다른 구독으로 전환하는 경우 같은 티어 레벨에서.

행동은 기간에 따라 달라집니다:

Different Duration → 기간이 다르면 다운그레이드

  • 다음 갱신일부터 적용
  • 예시: 월간 프리미엄 (레벨 1) → 연간 프리미엄 (레벨 1)

Same Duration → 기간이 같으면 업그레이드

  • 즉시 적용
  • 예시: 프리미엄 월간 (레벨 1) → 얼티밋 월간 (레벨 1)

구독 그룹 만들기

구독 그룹 만들기
  1. Navigate to Subscriptions

    App Store Connect에서 앱을 선택하고 Monetize > 구독.

  2. 그룹 만들기

    클릭 + '구독 그룹' 옆에 있는 '새 그룹 만들기'를 클릭합니다.

  3. 그룹 이름

    구독 그룹에 포함된 구독을 반영하는 설명적인 이름을 선택하세요.

    • '프리미엄 접근'
    • '클라우드 스토리지 플랜'
    • '프로 기능'
  4. 구독 추가

    After creating the group, add individual subscriptions to it. Each subscription will have a level ranking.

  5. 등급 순위 설정

    구독을 최고가 (1)부터 최저가까지 정렬하세요. 고려할 점:

    • 년간 계획은 월간 계획보다 등급이 높습니다.
    • 가격이 높은 계층은 가격이 낮은 계층보다 위에 있습니다.
    • 최상위/최상위 계층은 최고 등급입니다.

앱에 사용하는 방법

앱에 사용하는 방법

native-purchases 플러그인은 구독 그룹 논리를 자동으로 처리합니다.

import { NativePurchases, PURCHASE_TYPE } from '@capgo/native-purchases';
// Fetch all subscriptions in a group
const { products } = await NativePurchases.getProducts({
productIdentifiers: ['premium_monthly', 'premium_annual', 'ultimate_monthly'],
productType: PURCHASE_TYPE.SUBS,
});
// Display current subscription using StoreKit transactions
const { purchases } = await NativePurchases.getPurchases({
productType: PURCHASE_TYPE.SUBS,
});
const activeSubs = purchases.filter((purchase) => purchase.isActive);
// Detect pending downgrade/cancellation (StoreKit sets willCancel === true)
const pendingChange = purchases.find((purchase) => purchase.willCancel === true);
if (pendingChange) {
console.log('Subscription will stop auto-renewing on', pendingChange.expirationDate);
}
// Purchase (StoreKit handles upgrades/downgrades automatically)
await NativePurchases.purchaseProduct({
productIdentifier: 'premium_annual',
productType: PURCHASE_TYPE.SUBS,
});
// Listen for StoreKit updates (fires on upgrades/downgrades/refunds)
NativePurchases.addListener('transactionUpdated', (transaction) => {
console.log('Subscription updated:', transaction);
});

구독 변경을 처리하는 방법

구독 변경을 처리하는 방법

변경 유형 감지

변경 유형 감지 섹션
import { NativePurchases, PURCHASE_TYPE } from '@capgo/native-purchases';
// Get current subscription info
const { purchases } = await NativePurchases.getPurchases({
productType: PURCHASE_TYPE.SUBS,
});
const currentSubscription = purchases.find(
(purchase) => purchase.subscriptionState === 'subscribed',
);
if (currentSubscription) {
// StoreKit reports if user cancelled auto-renew
if (currentSubscription.willCancel) {
console.log(
`User cancelled. Access remains until ${currentSubscription.expirationDate}`,
);
}
if (currentSubscription.isUpgraded) {
console.log('User recently upgraded to this plan.');
}
}
// Listen for automatic upgrades/downgrades
NativePurchases.addListener('transactionUpdated', (transaction) => {
console.log('Subscription changed!', transaction);
if (transaction.subscriptionState === 'revoked') {
revokeAccess();
} else if (transaction.isActive) {
unlockPremiumFeatures();
}
});

사용자 커뮤니케이션

사용자 커뮤니케이션 섹션

변경 동작을 항상 명확하게 전달하세요:

업그레이드:

“You’ll get immediate access to Premium features. We’ll prorate your current subscription.”

다운그레이드:

“You’ll keep Premium access until [renewal date], then switch to Standard.”

크로스 그레이드:

“Your plan will change to Annual billing at the next renewal on [date].”

서버 모니터링

서버 모니터링 섹션

__CAPGO_KEEP_0__의 App Store Server Notifications v2 또는 __CAPGO_KEEP_0__의 자체 수신증명 백엔드 사용하여 StoreKit 변경 사항을 데이터베이스에 반영하세요. 서버通知와 __CAPGO_KEEP_0__를 pair하세요. 클라이언트와 백엔드가 동기화되도록 하세요. transactionUpdated 최선의 방법

비관련 기능을 섞지 마세요 (예: 저장소 및 광고 제거)

다른 기능 세트에 대한 별도의 그룹을 생성하세요
  • 등급 순위 전략
  • __CAPGO_KEEP_1__
  • __CAPGO_KEEP_2__
  • 연간 계획 → 월간 계획보다 높은 등급 (같은 등급)
  • 월간 계획보다 높은 등급 → 가격이 더 높다
  • 가치만 고려하지 말고

사용자 경험

사용자 경험 섹션
  • 현재 구독을 명확하게 표시
  • 그룹 내 모든 옵션을 표시
  • 즉시 적용되는 변경 사항과 갱신 시 적용되는 변경 사항을 표시
  • 계획 간 쉬운switching을 허용
  • 모든 업그레이드 시나리오를 테스트하십시오
  • 모든 다운그레이드 시나리오를 테스트하십시오
  • 크로스 그레이드 동작을 확인하십시오
  • 웹훅 작동을 확인하십시오

일반 시나리오

일반 시나리오 제목

3대 계층 월간 요금제: 시나리오 1

3대 계층 월간 요금제: 시나리오 1 제목
Level 1: Ultimate Monthly ($19.99)
Level 2: Premium Monthly ($9.99)
Level 3: Basic Monthly ($4.99)
  • 기본 → 프리미엄: 즉시 업그레이드
  • 프리미엄 → 최고급: 즉시 업그레이드
  • 최고급 → 프리미엄: 갱신 시 다운그레이드
  • 기본 → 최고급: 업그레이드 (즉시)

Scenario 2: 혼합 지속 기간 계획

Scenario 2: 혼합 지속 기간 계획
Level 1: Premium Annual ($99.99/year)
Level 2: Premium Monthly ($9.99/month)
  • 월 → 연: 교계 (재정의 시)
  • 연 → 월: 다운그레이드 (재정의 시)

Scenario 3: 다중 층 다중 지속 기간

Scenario 3: 다중 층 다중 지속 기간
Level 1: Ultimate Annual ($199/year)
Level 2: Ultimate Monthly ($19.99/month)
Level 3: Premium Annual ($99/year)
Level 4: Premium Monthly ($9.99/month)
Level 5: Basic Annual ($49/year)
Level 6: Basic Monthly ($4.99/month)

이 설정은 최대 유연성을 제공하면서 명확한 업그레이드/다운그레이드 논리를 유지합니다.

문제 해결

문제 해결

구독이 그룹에 나타나지 않습니다.:

  • 정확한 그룹에 할당되어 있는지 확인하세요.
  • 최소 '제출 준비' 상태 이상인지 확인하세요.
  • 제품 ID가 정확한지 확인하세요.

업그레이드/다운그레이드 동작이 잘못된 경우:

  • 레벨 순위 검토 (1 = 가장 높은 순위)
  • 구독 등급이 합리적인지 확인하세요.
  • 레벨이 올바르게 설정되어 있는지 확인하세요.

다른 그룹의 제품:

  • 사용자는 동시에 여러 그룹에 구독할 수 있습니다.
  • 관련 제품을 동일한 그룹에 유지하는 것이 의도된 것입니다.

getActiveProducts에서 여러 구독이 표시되는 경우:

  • 구독 그룹이 다른지 확인하세요.
  • 가족 공유를 통해 구독하지 않은 사용자 여부를 확인하세요.
  • 앱 스토어 커넥트에서 구독 상태를 검토하세요.

추가 리소스

추가 리소스

자세한 내용은 구독 그룹에 대한 공식 애플 문서를 참조하세요..

Create iOS Subscription Group에서 계속 진행하세요.

Create iOS Subscription Group을 사용하여

스토어 승인 및 배포를 계획하고 있습니다. Create iOS Subscription Group을 연결하세요. Create iOS Subscription Group If you are using @capgo/구간갑세요 for the native capability in @capgo/구간갑세요, @capgo/capacitor-총세요세요 for the implementation detail in @capgo/capacitor-총세요세요, Using @capgo/capacitor-총세요세요 for the native capability in Using @capgo/capacitor-총세요세요, @capgo/capacitor-총총세요 for the implementation detail in @capgo/capacitor-총총세요, and Using @capgo/capacitor-총총세요 for the native capability in Using @capgo/capacitor-총총세요.