Mobile app monetization encompasses the complete revenue infrastructure for apps—from in-app purchases and subscriptions managed through StoreKit 2 (iOS) and Google Play Billing Library (Android) to ad-based models and hybrid strategies. Unlike web commerce, mobile monetization requires navigating platform-specific billing APIs, server-side validation protocols, and complex lifecycle states (grace periods, billing retry, account hold). The shift toward subscriptions as the dominant model demands expertise in paywall design, cohort retention analysis, and continuous A/B testing of pricing tiers, while ad-integrated apps layer rewarded video, interstitial, and native formats atop purchase flows. A key insight: server-side receipt validation is non-negotiable—client-only verification invites fraud that can collapse revenue overnight, while real-time webhook notifications from App Store Server Notifications V2 and Google Play RTDN enable instant entitlement updates that prevent unauthorized access and improve user experience.
What This Cheat Sheet Covers
This topic spans 13 focused tables and 87 indexed concepts, 85 flashcards. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
A jump-to index of every table row in this cheat sheet.
An interactive map of every table and concept in this topic.
Table 1: StoreKit 2 Core Components (iOS)
StoreKit 2 is Apple's modern async/await purchase API, and these are the pieces you reach for constantly—loading a Product, processing a cryptographically signed Transaction, and reading currentEntitlements to decide what to unlock. The thread running through every row is trust: only act on .verified results, and always finish() a transaction so the store stops re-delivering it.
| Component | Example | Description | |
|---|---|---|---|
let products = try await Product.products(for: ["com.app.monthly"])let product = products.first | • Represents an in-app purchase or subscription • loaded from App Store Connect via product IDs • includes localized title, description, and price | ||
for await result in Transaction.updates { if case .verified(let transaction) = result { await transaction.finish() }} | • Cryptographically signed record of a purchase or subscription event • must call finish() after processing to acknowledge receipt• monitor Transaction.updates for real-time changes | ||
let result = try await product.purchase()switch result {case .success(let verification): ...case .userCancelled: ...case .pending: ...} | • Initiates the App Store purchase flow • returns a PurchaseResult enum indicating success, cancellation, or pending approval (e.g., Ask to Buy). | ||
if let info = product.subscription { let group = info.subscriptionGroupID let period = info.subscriptionPeriod} | • Metadata for auto-renewable subscriptions • provides subscription group ID, period (weekly/monthly/yearly), and introductory offer eligibility | ||
for await result in Transaction.currentEntitlements { if case .verified(let tx) = result { // Grant access }} | • Asynchronous sequence of active, verified transactions • use at app launch to restore purchases and determine which content to unlock • filters out expired or revoked transactions | ||
if case .verified(let transaction) = result { // Safe to trust} else { // Jailbroken device or tampered data} | • Wraps transactions with cryptographic validation • only process .verified cases to prevent fraud• .unverified indicates potential device compromise | ||
try await AppStore.sync() | • Force-syncs the local receipt with the App Store • useful after account changes, but most apps should rely on automatic syncing via Transaction.updates instead | ||
StoreView(ids: ["com.app.monthly", "com.app.yearly"]) .storeButton(.visible, for: .redeemCode) | • SwiftUI view that displays products with native App Store UI • minimal customization but zero implementation effort • ideal for simple paywalls | ||
SubscriptionStoreView(groupID: "ABC123") { Text("Example Content")}.subscriptionStoreControlStyle(.prominentPicker) | • SwiftUI view for subscription-specific paywalls • auto-generates UI for all products in a subscription group • supports introductory offer badges and legal text rendering without manual coding |