Development purchase mode
Test purchases and subscription lifecycle changes without App Store setup.
Development purchase mode lets a debug build buy from a fake store while Voidhash processes the purchases for real. Use it to test your purchase flow, entitlement checks, and subscription lifecycle handling before you connect App Store Connect.
Everything the fake store creates is tagged as development: purchases, subscriptions, grants, and
revenue events. Tagged records never appear in production customer state or revenue unless you
explicitly ask for development data.
Enable it
Start in Studio. Create a product and attach its perks. Subscription products need a billing duration, because the duration controls their simulated renewal and expiry dates. You do not need to connect App Store Connect.
Then turn on the dev option when you configure the SDK at launch.
var options = VoidhashOptions()
options.dev = true
Voidhash.configure(publishableKey: "vh_pk_...", options: options)With the option on, a purchase shows a confirmation sheet instead of the App Store sheet. The SDK waits briefly to simulate processing. Once the backend accepts the purchase, the SDK refreshes the person snapshot, so your entitlement checks see the new grant.
Development purchases go through purchase(product:) and paywalls like real ones, so the SDK has to
own purchases. In observer mode, purchase(product:) throws
READ_ONLY_PURCHASE_NOT_ALLOWED even with dev on.
The fake store has no promotional offers or App Store sheets. A purchase with an offerId buys the
product at its test price, and presentCodeRedemptionSheet() and showManageSubscriptions()
throw METHOD_NOT_AVAILABLE_PLATFORM.
The option is only honored in a debug build. Release builds always use the real StoreKit adapter.
Set dev: false if you want a debug build to use the real store. You do not need the debug
option as well: in development mode the SDK marks its requests as coming from a debug build,
which Voidhash requires before it accepts a development purchase.
Fixed test prices
Development purchases use fixed USD prices, so you do not need store pricing to test.
| Product | USD price |
|---|---|
| Weekly subscription | $4.99 |
| Monthly subscription | $9.99 |
| Quarterly subscription | $24.99 |
| Six-month subscription | $39.99 |
| Annual subscription | $49.99 |
| Non-consumable | $19.99 |
| Consumable | $4.99 |
Legacy subscriptions without a duration are simulated as monthly and return a warning.
Simulate lifecycle events
Open a person in Studio to move a development subscription through its lifecycle. You can renew, expire, revoke, or refund it, or place it into a three-day grace period. Each action is idempotent: applying it twice has the same effect as applying it once.
Test data stays easy to tell apart. Development badges mark every test row, and the dashboard's environment switcher next to the project name shows Development data on its own.
Project settings let you disable new development purchases. They also let you reset all development purchases, subscriptions, grants, transactions, and purchase-ledger records. A reset never touches production or sandbox data.