Home / Companies / RevenueCat / Blog / Post Details
Content Deep Dive

StoreKit 2によるiOSのアプリ内課金のチュートリアル

Blog post from RevenueCat

Post Details
Company
Date Published
Author
Kishikawa Katsumi
Word Count
3,411
Language
English
Hacker News Points
-
Summary

This StoreKit 2 tutorial provides a comprehensive guide for developers to implement in-app purchases and subscriptions in iOS, macOS, watchOS, and tvOS applications using Apple's updated framework. While Apple's documentation offers basic explanations, this tutorial delves into the complexities of StoreKit 2, covering key concepts, App Store Connect configuration, and methods for displaying, completing, and verifying purchases, as well as handling external changes such as updates and cancellations. It discusses the benefits and trade-offs of having a backend server, provides sample Swift code, and includes a sample app available for download. The tutorial also explains how to manage different types of in-app purchases, including consumables, non-consumables, auto-renewable subscriptions, and non-renewing subscriptions, while emphasizing the use of StoreKit Configuration Files for local testing. Moreover, it outlines the steps for purchase restoration and offline transactions, and explores server-side implementation options using the App Store Server API and Notifications for a more robust handling of subscriptions and transaction verifications.