RORK LABJP
TOOLING — Rork's developer repos keep moving: rork-xcode was updated on July 16, rork-device on July 15, and rork-plist on July 13OPUS46 — Claude Opus 4.6 is live in Rork, and Rork Max is built to assemble apps on top of Claude CodeSIM — A cloud iOS simulator runs in the browser, with one click to install on a device and two clicks to publish to the App StoreMAX — Rork Max emits pure Swift rather than React Native, reaching iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and even iMessageNATIVE — That opens up HealthKit, ARKit and LiDAR, NFC, Dynamic Island, Live Activities, 3D through Metal, and on-device inference with Core MLSEED — Rork raised a $15M seed led by Left Lane Capital, with Peak XV and a16z Speedrun joining the roundTOOLING — Rork's developer repos keep moving: rork-xcode was updated on July 16, rork-device on July 15, and rork-plist on July 13OPUS46 — Claude Opus 4.6 is live in Rork, and Rork Max is built to assemble apps on top of Claude CodeSIM — A cloud iOS simulator runs in the browser, with one click to install on a device and two clicks to publish to the App StoreMAX — Rork Max emits pure Swift rather than React Native, reaching iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and even iMessageNATIVE — That opens up HealthKit, ARKit and LiDAR, NFC, Dynamic Island, Live Activities, 3D through Metal, and on-device inference with Core MLSEED — Rork raised a $15M seed led by Left Lane Capital, with Peak XV and a16z Speedrun joining the round
Articles/Dev Tools
Dev Tools/2026-05-25Intermediate

Implementation Notes: Adding StoreKit 2 In-App Purchases to a Rork iOS App

Notes from grafting StoreKit 2 in-app purchases onto Swift/SwiftUI code generated by Rork, drawing on the StoreKit 1-to-2 migration done across a 50M-cumulative-download wallpaper-app portfolio. Covers ProductID design, transaction verification, paywall UI, and production gotchas.

rork58rork-max40storekit-2in-app-purchase3ios12swiftui11indie-developer

Premium Article

A Rork-generated iOS app boots, navigates, and renders cleanly — but the paid feature gate is often left as a placeholder with a comment that says "implement purchase here." Apps that need IAP to ship will sit at this exact line until somebody writes the StoreKit code, and I have watched more than one indie developer abandon a near-finished app at this step.

I am Masaki Hirokawa. I have been a solo iOS/Android developer since 2014, with roughly 50 million cumulative downloads across a wallpaper-app portfolio (Beautiful Wallpapers, Ukiyo-e Wallpapers, Cool Wallpapers, Illustration Wallpapers, Dolice Wallpapers), and I also run four Lab sites and two blog sites in parallel. I migrated all five apps from StoreKit 1 to StoreKit 2 in 2025, so when I started adding IAP to Rork-generated apps the work was familiar.

These are notes from that grafting work. Aimed at developers with a working Rork-generated app blocked on IAP, or those looking for a StoreKit 2 example that matches Rork's code shape (Apple's official samples assume a different file structure).

Why You End Up Bolting StoreKit 2 onto Rork Code

Rork scaffolds the SwiftUI skeleton of an app, but it deliberately leaves IAP as placeholders. The reason is structural: IAP requires App Store Connect setup (ProductID creation, tax form submission, banking, contract acceptance) to even test, and Rork cannot validate against that side.

A typical Rork-generated app looks like:

MyApp/
├── MyAppApp.swift           ← @main entry
├── ContentView.swift        ← root view
├── Views/
│   ├── WallpaperView.swift  ← feature view
│   └── PremiumGateView.swift ← "implement purchase" placeholder
├── Models/
│   ├── WallpaperItem.swift
│   └── PurchaseManager.swift ← body is TODO
└── Resources/
    └── Assets.xcassets

PurchaseManager.swift is empty, and your job is to fill it with StoreKit 2 logic. The SwiftUI base makes this pleasant — StoreKit 2 integrates naturally without the StoreKit 1 ceremony of forcing SKProductsRequestDelegate through SwiftUI's lifecycle.

Having just migrated five wallpaper apps from StoreKit 1 to 2, the Rork grafting felt like rerunning that migration on a clean canvas. If you are coming to StoreKit 2 fresh, expect a small learning curve. This guide is written for that audience and covers the whole loop end to end.

App Store Connect Prep — The Real Bottleneck

Before any code, App Store Connect needs setup. This is where I see most indie developers stall.

First, complete the IAP contract and tax forms in App Store Connect. Without them IAP does not work in sandbox or production. Fill the entire "Tax, Banking, and Trade Representative Contact Information" section.

Second, decide a ProductID naming convention and create the products. My convention:

{bundle_id}.{type}.{label}

Examples:
- com.dolice.wallpaper.consumable.pack_50      (consumable)
- com.dolice.wallpaper.nonconsumable.premium    (non-consumable)
- com.dolice.wallpaper.subscription.monthly     (monthly sub)
- com.dolice.wallpaper.subscription.yearly      (yearly sub)

Pick a convention before you create anything. If app #1 has premium_full and app #2 has unlock_all, your shared code grows branches. Standardizing upfront is a practical recommendation for indie operations.

Third, the same ProductID is used in sandbox and production. Apple sandbox testing and production purchases share the ID, so changing it later is structurally hard. Choose carefully on day one.

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
Concrete implementation steps and a folder layout for grafting StoreKit 2 onto the Swift/SwiftUI code Rork generates — full working code included.
ProductID design and transaction-verification pitfalls learned from migrating a 50M-download wallpaper-app portfolio from StoreKit 1 to StoreKit 2.
A practical decision matrix for choosing between plain StoreKit 2 and RevenueCat at indie scale, with the financial and operational cutover points spelled out.
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

Rork 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

Dev Tools2026-04-24
Rork Max SwiftUI Output Won't Build in Xcode — A Symptom-Based Recovery Guide
When Rork Max's generated SwiftUI project fails to build in Xcode, the right fix depends on the exact error. This guide walks through the common failure modes — dependency resolution, Info.plist, entitlements, bundle ID conflicts — with targeted recovery steps for each.
Dev Tools2026-05-05
Getting Your Rork Max App Through App Store Review: A Practical Guide
A complete guide to App Store submission for Rork Max apps—covering the most common rejection reasons, metadata requirements, privacy policy setup, pre-submission testing, and post-launch ASO for continued growth.
Dev Tools2026-04-24
Optimizing Machine Learning in Rork Max Apps — Core ML Integration, Per-Device Tuning, Quantization, Size Reduction
A complete playbook for integrating Core ML into SwiftUI apps generated by Rork Max: model conversion, quantization, Neural Engine targeting, battery management, and per-device tuning — written at the implementation level, not the marketing one.
📚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 →