iOS Quality & ComplianceLesson 73Free preview
In-App Purchases
This lesson is part of Swift · All levels
Summary
This lesson reviews the implementation of in-app purchases and subscriptions using StoreKit 2 on iOS. StoreKit 2 simplifies transactions with the modern Swift concurrency-based API, cryptographic verification of transactions on the device through JWS (JSON Web Signature), and the visual component of SwiftUI StoreView.
Key points
- StoreKit 2 uses Swift concurrency (async/await) for the entire product transaction stream
- Supporting product types: Consumable, Non-Consumable, Auto-Renewable Subscription, and Non-Renewing Subscription
- Transactions are signed cryptographically using the JWS format so they are safe from manipulation
- Xcode provides StoreKit Configuration File (.storekit) for local testing without the internet
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.