WWDC 2022: StoreKit, Testing, and Server Updates for App Developers
WWDC 2022 did not introduce a successor to StoreKit 2. Instead, Apple expanded the Swift-based in-app purchase framework, its testing tools, and its server-side APIs. The practical focus was clearer transaction data, faster local testing, automated product management, and more reliable subscription notifications.
StoreKit 2: richer transaction data and in-app messages
StoreKit 2 gained three useful data points. A price locale helps format derived amounts, such as a monthly equivalent of an annual price, according to the product's numerical price. A server environment value identifies whether a transaction occurred in Xcode, sandbox, or production. A recent subscription start date shows the latest start of a continuous subscription with no gap longer than 60 days, which can signal returning or loyal customers.
For SwiftUI apps, Apple added an offer-code redemption modifier that presents the redemption sheet over the current screen, and a request-review environment value that simplifies asking for a review. Review prompts still benefit from product logic, so teams may only request one after a meaningful positive interaction.
The StoreKit Messages API addresses a different problem: Apple sometimes needs to tell subscribers about changes such as a price increase. Messages can now appear inside the app. By default Apple displays them while the app is in the foreground, but an API lets developers listen for messages, queue them, and present them at a less disruptive moment.
The AppTransaction API verifies purchase of the app itself and exposes transaction history. That is especially relevant when moving from a paid app to a freemium model, because it helps determine which features a returning user should receive after the shift to in-app purchases.
App Store Connect automation and better StoreKit testing
The App Store Connect API added management of in-app purchases and subscriptions. Teams can create, edit, and delete products, manage pricing, submit products for review, and create offers and promo codes. This matters most for catalogs that change frequently or contain many products, where manual setup is slow and error-prone.
StoreKit testing also became more practical. Configuration files used to mock App Store purchases locally can now be generated and synced from App Store Connect, removing repetitive manual product entry. The Xcode 14 transaction inspector shows expiry, upcoming renewals, product identifier, and subscription group, and can filter by multiple properties. From a selected transaction, developers can test price-increase messaging, billing retries, and grace periods.
Sandbox setup was simplified as well: fewer fields are required to create a test user, billing failures can be tested from sandbox account settings, and those failures can be verified through the App Store Server API for a more complete end-to-end test.
Documentation and SKAdNetwork 4.0
Swift-DocC gained a navigation sidebar, API search, and support for documenting Objective-C and C APIs alongside Swift. Those changes make mixed-language frameworks easier to browse and search.
SKAdNetwork 4.0 focused on richer attribution. Hierarchical identifiers and conversion values allow more data for larger apps with many conversions while still providing some data to smaller apps. Multiple postbacks replace a single extendable conversion timer, with later postbacks carrying less granularity but capturing later customer-journey events. Web ads can also send impression data to SKAdNetwork, opening web advertising as an attribution channel for apps.
Three caveats mattered. The release was described as later in the year rather than with iOS 16, possibly slipping into 2023. It appeared tied to iOS 16 and iPhone 8 or later, so adoption would be gradual. Even with up to two additional postbacks within 35 days of install, postbacks still required the user to open the app, limiting signals such as trial cancellations made in Settings.
App Store Server API: filtering, sorting, and notification recovery
Server-side transaction records gained environment and recent subscription start date fields. Environment is limited to Production or Sandbox because local Xcode transactions do not pass through Apple's servers.
Get Transaction History became more selective. Results can be filtered by in-app product type, product identifier, subscription group identifier, purchase date range, and family sharing status, and revoked transactions can be excluded. Sorting by last modified date in descending order returns the most recently updated transactions first. Together, these options reduce the need to download everything and filter or sort locally.
Server Notifications V2 received two operational improvements. Developers can request a test notification and then check whether it arrived, including an error message if it did not, instead of creating a sandbox tester and making a test purchase. A new history endpoint also retains a six-month rolling record that can be replayed and filtered by purchase type, subtype, or user. That helps recover from outages longer than the standard retry window, which retries production notifications up to five times with increasing waits.
Implementation checklist
Use this checklist to decide where to start:
- Add price locale, environment, and recent subscription start date where derived pricing, environment checks, or loyalty signals are needed.
- Replace imperative offer-code presentation with the SwiftUI modifier in SwiftUI-only flows, and gate review requests behind positive user moments.
- Queue StoreKit messages if automatic foreground display could interrupt a critical flow.
- Generate StoreKit configuration files from App Store Connect and use the transaction inspector for expiry, renewal, billing-retry, and grace-period tests.
- Use server-side filtering and last-modified sorting when reconciling transaction history, and add notification-history replay to your recovery plan.
- Treat SKAdNetwork 4.0 as a phased rollout: plan for iOS adoption and for events that occur outside the app.
Frequently asked questions
Do the new StoreKit 2 properties require iOS 16?
No. The new StoreKit properties were described as backwards-compatible to iOS 15 when the app is built with Xcode 14, which compiles the new properties into the app.
What changed for StoreKit testing in Xcode 14?
StoreKit configuration files can now be generated and synced directly from App Store Connect, instead of manually adding every in-app product locally. Xcode 14 also adds a transaction inspector with multi-property filtering and actions such as testing price-increase messages, billing retries, and grace periods.
What can the App Store Connect API now manage for in-app purchases?
You can create, edit, and delete in-app products, manage pricing, submit products for review, and create offers and promo codes. The update was expected in summer 2022.
When was SKAdNetwork 4.0 expected, and what limited its reach?
Apple said SKAdNetwork 4.0 would ship later in the year, not with iOS 16 in the fall, and it could slip into 2023. It also appeared tied to iOS 16, with a minimum of iPhone 8 and 8 Plus, which would limit early reach.