Slide 17
Slide 17 text
StoreKit
2
の場合
‣ユーザーの直接操作による購読
• await してそのまま取得可能
‣ユーザーの直接操作でない
外部起因の継続的なUpdateEvent
• AsyncSequence を購読
• サブスクリプションの更新
• オファーコード
• 他端末経由の購
入
etc...
1
7
let result = try await product.purchase()
switch result {
case let .success(verificationResult):
switch verificationResult {
case .verified(let signedType):
// վ͟Μ͞Ε͍ͯͳ͍͜ͱΛ֬ೝ
case let .unverified(_, verificationError):
}
case .pending, .userCancelled:
}
Task {
for await verificationResult in Transaction.updates {
switch verificationResult { ... }
}
}