Skip to content
AppDues
Log in
Contact salesSign up

iOS SDK v4: Swift, async/await and StoreKit 2

Version 4 of this iOS SDK is a major modernization release. It moves the implementation to Swift, adds optional async/await forms of public APIs, introduces StoreKit-agnostic wrappers, renames confusing methods, and adds support flows for managing subscriptions and requesting refunds.

Swift migration without dropping Objective-C

The implementation was rewritten from Objective-C in Swift. That change enables Swift Concurrency support and StoreKit 2 features and is intended to make future iteration faster. Objective-C compatibility is retained, so existing Objective-C code does not need to be rewritten to adopt the release.

Async/await alternatives simplify result handling

Every public API gained an optional async/await alternative. The practical gain is clearer control flow: a successful awaited call returns a non-optional result, while failure is handled through a thrown error instead of a separate error parameter. This removes the completion-block case where both the result and error are nil, a combination the SDK would not produce but the compiler still required callers to handle. An AsyncStream also provides CustomerInfo updates as an asynchronous sequence, as an alternative to delegate callbacks. Use the protected code modules accompanying this page for the exact completion-block, async/await, promotional-offer and stream examples.

StoreKit wrappers hide the underlying version

StoreKit wrappers let application code stay independent of the underlying StoreKit version. StoreProduct covers the product types from both StoreKit generations, StoreTransaction covers the transaction types, and StoreProductDiscount covers the discount types. The wrappers also add convenience helpers, including a method for retrieving eligible promotional offers directly from a product, which shortens the subscription-offer flow shown in the protected examples. Because the public surface is version-agnostic, the SDK can choose the more reliable implementation for each feature internally.

Consistency and clarity improvements

Two similarly named restore and sync methods were aligned so their names follow the same pattern. Documentation strings were also expanded with more usage context, reducing the need to leave the development environment to understand a method. Before upgrading, search your codebase for the old restore method name and update call sites and documentation references accordingly.

Customer support APIs

showManageSuscriptions detects the store or billing provider used for the subscription and opens the matching management page, covering App Store, Google Play, Stripe and Amazon Store purchases. beginRefundRequest gives users an in-app path to start a refund request. Together they move common support tasks into the app instead of sending users to find the right external page themselves.

StoreKit 2 support: automatic for some features, beta for all

StoreKit 2 is used automatically for selected features, such as introductory price eligibility, on devices that support it; other devices fall back to StoreKit 1. A separate beta opt-in, controlled by the useStoreKit2IfAvailable configuration flag, extends StoreKit 2 use to all features including purchases. Treat the beta opt-in as a deliberate testing decision rather than the default upgrade path, and validate purchase flows on supported devices before enabling it broadly.

New documentation

Reference documentation was rebuilt with DocC for cleaner presentation, more reliable internal links and additional documentation features. Use the updated reference pages alongside the release comparison when planning the upgrade.

Upgrade checklist

  1. Inventory call sites for renamed methods and completion-block APIs. 2. Decide which flows benefit from async/await first, starting with offerings and promotional offers. 3. Replace direct StoreKit type references with the version-agnostic wrappers where possible. 4. Test subscription management and refund flows for each billing provider you support. 5. Test StoreKit 2 behavior on capable devices, keeping the all-features beta opt-in separate from the default configuration until validated.
iOS SDK v4 change map
AreaWhat changedPractical effect
LanguageCodebase migrated to Swift; Objective-C compatibility retainedExisting Objective-C apps can adopt the release without a language rewrite
Async APIsOptional async/await alternatives for public APIs; AsyncStream for CustomerInfo updatesSimpler success and error handling; delegate alternative for updates
StoreKit abstractionStoreProduct, StoreTransaction and StoreProductDiscount wrappersApp code does not need to branch on StoreKit version
Naming and docsAligned restore/sync names; expanded docstrings; DocC reference docsFewer confusing call sites and clearer in-editor guidance
Support APIsshowManageSuscriptions and beginRefundRequestIn-app subscription management and refund entry points
StoreKit 2Automatic for selected features; beta flag for all featuresDefault fallback to StoreKit 1; opt-in requires testing

Summary of the v4 changes described on this page; beta status applies only to the all-features StoreKit 2 opt-in.

Frequently asked questions

Does the Swift rewrite break Objective-C apps?

Yes. The codebase moved to Swift while remaining compatible with Objective-C, so existing Objective-C apps can continue using it.

Must I switch every call to async/await?

No. Async/await alternatives are optional. Completion-block APIs remain available for Objective-C compatibility, while async/await removes forced handling of a simultaneously nil result and error.

How is StoreKit 2 enabled?

By default, StoreKit 2 is used automatically for selected features when the device supports it, such as introductory price eligibility, and StoreKit 1 is used otherwise. A beta opt-in flag can enable StoreKit 2 for all features, including purchases.

What do the new customer support APIs do?

showManageSuscriptions opens the appropriate management page based on where the subscription was purchased, including App Store, Google Play, Stripe, or Amazon Store. beginRefundRequest lets users start a refund request from inside the app.