SwiftUI StoreKit SubscriptionStoreView 学習その1
SubscriptionStoreView(productIDs: ["プロダクトID"])
.background(.gray.opacity(0.2))
.onInAppPurchaseStart(perform: { product in
print("商品の購入ボタンを使用")
print(product)
})
.onInAppPurchaseCompletion(perform: { (product, result) in
print("購入が完了した")
print(product)
print(result)
})
onInAppPurchaseStartとonInAppPurchaseCompletionのコールされるタイミングは画像の通り。
onInAppPurchaseCompletionで、アプリケーションの機能開放処理等をコーディングすれば良い。







