CLAUDE LABJP
FORK — Claude Code 2.1.212 changes what /fork does: it copies your conversation into a new background session with its own row in claude agents, so you can keep working. The old in-session subagent is now /subtaskLIMITS — WebSearch calls are now capped at 200 per session by default, and subagent spawns get the same 200 ceiling, so a runaway search or delegation loop stops on its ownMCPBG — MCP tool calls running past two minutes now move to the background automatically, keeping the session usable. Tune the threshold with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSPLANFIX — Fixed plan mode auto-running file-modifying Bash commands such as touch and rm without a permission prompt or an SDK canUseTool callbackSONNET5 — Claude Sonnet 5 is running on introductory pricing of $2 per million input tokens and $10 per million output. After August 31 it moves to $3 and $15IPO — Bankers are reportedly lining up investor meetings for Anthropic ahead of a possible public listing as soon as OctoberFORK — Claude Code 2.1.212 changes what /fork does: it copies your conversation into a new background session with its own row in claude agents, so you can keep working. The old in-session subagent is now /subtaskLIMITS — WebSearch calls are now capped at 200 per session by default, and subagent spawns get the same 200 ceiling, so a runaway search or delegation loop stops on its ownMCPBG — MCP tool calls running past two minutes now move to the background automatically, keeping the session usable. Tune the threshold with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSPLANFIX — Fixed plan mode auto-running file-modifying Bash commands such as touch and rm without a permission prompt or an SDK canUseTool callbackSONNET5 — Claude Sonnet 5 is running on introductory pricing of $2 per million input tokens and $10 per million output. After August 31 it moves to $3 and $15IPO — Bankers are reportedly lining up investor meetings for Anthropic ahead of a possible public listing as soon as October
Articles/Claude Code
Claude Code/2026-04-15Advanced

Claude Code × SwiftUI × StoreKit 2 — Complete In-App Purchase & Subscription Implementation Guide

Master in-app purchases and subscriptions with Claude Code, SwiftUI, and StoreKit 2. From transaction handling and server-side validation to paywall UI design — production-quality code that passes App Store review.

Claude Code197SwiftUI7StoreKit 2iOS24in-app purchasesubscription5Swift5App Store7

Premium Article

Why StoreKit 2 Trips Up Even Experienced Developers

The frustration with StoreKit 2 implementation isn't usually the API itself — it's not knowing what "correct" looks like. Stack Overflow answers reference the old StoreKit 1 APIs. Apple's documentation prioritizes conceptual explanations over showing you the complete picture. And the Sandbox environment's quirks produce bugs that don't appear until production.

StoreKit 2, released in 2022, is a full rewrite around async/await. The shift away from SKPaymentQueue, SKProductsRequest, and completion-handler-based code is welcome — but developers who learned StoreKit 1 often hit unexpected roadblocks when the new Transaction and Product types behave differently from what they expect.

This guide builds a complete StoreKit 2 × SwiftUI implementation from scratch, using Claude Code as a design partner throughout. We'll cover consumable products, auto-renewable subscriptions, server-side validation, and paywall UI — all to the standard required for App Store approval.

For setting up Claude Code with your iOS project, see Claude Code × Swift/iOS Production App Development Guide first.


Why Claude Code Is an Effective StoreKit 2 Partner

Claude Code brings three specific advantages to StoreKit 2 work:

Full project context for architecture decisions. Claude Code reads your entire project before making suggestions. When you say "I want to manage subscription state in this ViewModel," it proposes solutions that fit your existing architecture rather than generic sample code.

Comprehensive error handling in one pass. StoreKit 2 error types span StoreKitError, Product.PurchaseError, and VerificationResult.VerificationError. Asking Claude Code to "handle all StoreKit 2 error cases" produces exhaustive coverage that would take significant research time to assemble manually.

Sandbox debugging support. When Transaction.currentEntitlements returns empty after a successful Sandbox purchase, or when entitlements don't refresh after subscription renewal, Claude Code can diagnose the issue and provide corrected code immediately.


Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Subtle Transaction.updates timing gaps that Apple docs never mention, and a cache-first design that eliminates the flash-of-paywall problem
How StoreKit 2 differs from Stripe in Source of Truth, refund handling, and price changes — lessons from running both side by side
Twelve years of indie iOS development distilled into four decision criteria for mixing subscriptions, one-time IAPs, and ads
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Claude Code2026-04-12
Claude Code × Swift/iOS Production Guide — From Xcode Integration to App Store Launch
A practical guide to building production-quality iOS apps with Claude Code and Xcode. Covers CLAUDE.md design, SwiftUI implementation, Clean Architecture, automated testing, Fastlane CI/CD, and App Store submission.
Claude Code2026-07-08
Auditing Your Own Code for Required Reason API Declarations with Claude Code
Required reason codes in PrivacyInfo.xcprivacy apply to your own code, not just third-party SDKs. After a wallpaper app of mine was rejected, here is the Claude Code workflow I use to scan Swift sources and match APIs to reason codes before submission.
Claude Code2026-06-30
Fixing Blurry Wallpapers on New iPhones with Claude Code: Safely Growing a Per-Device Resolution Map
Why wallpapers go blurry or letterboxed on brand-new iPhones, and how to collapse scattered device branches into a single source of truth you can extend in one line — walked through as a real Claude Code refactor with before/after code.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →