提供商品
| プラン | Product ID |
| 月額 | com.happyboy1002.StudyStopwatch.premium.monthly |
| 年額 | com.happyboy1002.StudyStopwatch.premium.yearly |
SubscriptionManager API
final class SubscriptionManager: ObservableObject {
@Published var products: [Product]
@Published var isPremium: Bool
func loadProducts() async
func purchase(_ product: Product) async throws
func restorePurchases() async throws
func startTransactionListener()
}
プレミアム特典
- 広告非表示(Banner / Interstitial)
- シェアカードの限定テーマ3種解放
- レポート画面の詳細統計(前週比 / 1日平均 / ベスト曜日)
処理フロー
Product.products(for:) で商品取得
- 購入時
product.purchase()
- 結果を
checkVerified() で検証
- 成功 →
transaction.finish()
- Transaction.updates 監視で自動更新も処理
外部連携
| 連携先 | 用途 |
| StoreKit 2 | 商品取得・購入・トランザクション監視 |
| App Store Connect | 商品設定・価格 |
変更履歴
| バージョン | 日付 | 変更内容 |
|---|
| 1.0 | 2026-05-09 | 初版作成 |