VoidhashDocs
DevelopersHelp centerGuidesAPI reference
Dashboard
Get started
Introduction
Quickstart
How Voidhash works
Glossary
Versions and releases
Concepts
Teams, projects and environments
API keys
Products and perks
Offers
Subscription lifecycle
People and identity
Events
Features
Paywalls in your app
Feature flags and A/B tests
Paywall components
Push notifications
Ad attribution in your app
Client SDKs
React Native
Swift
Kotlin
Web
Your backend
Node.js
PHP
Go
Rust
Other languages
Payment sources
Forward store notifications
Developer tools
CLI
MCP server
Query analytics with VoidQL
Swift SDK
Swift quickstart
Display a paywall
Make and restore purchases
Check access
Identify users
Evaluate feature flags
Capture analytics
Track screens
Development mode
Swift SDK reference
Errors
Diagnostic codes
Troubleshooting

Development mode

Test purchases and access in debug builds without App Store Connect.

Development mode lets a debug build buy from a simulated store while Voidhash processes the purchases for real. Use it to test your purchase flow, paywalls and access checks in the Simulator or on a device before you connect App Store Connect.

Simulated purchases are recorded in the test environment and never unlock access in production or count toward production revenue. See Environments.

Turn it on

  1. In Studio, create a product and attach its perks. A subscription product needs a billing duration, which sets its simulated renewal and expiry dates. You don't need to connect the App Store.
  2. Make sure Settings → General → Simulated purchases → Enable simulated purchases is on. It is by default.
  3. Set dev and the test publishable key in debug builds:
MyApp.swift
import Voidhash

func configureVoidhash() {
    var options = VoidhashOptions()

    #if DEBUG
        options.dev = true
        let publishableKey = "vh_pk_test_..."
    #else
        let publishableKey = "vh_pk_..."
    #endif

    Voidhash.configure(publishableKey: publishableKey, options: options)
}

Voidhash refuses simulated purchases made with a production key. The dev option is honored only when the SDK is compiled in a debug configuration; release builds always use StoreKit. You don't need debug as well.

How it behaves

  • getProducts() returns every product in the project, priced as in Test prices, without asking the App Store.
  • A purchase shows a confirmation sheet instead of the App Store sheet, waits briefly, and refreshes the person once Voidhash accepts it.
  • Paywalls buy through the same simulated store.
  • A purchase with an offerId buys the product at its test price.
  • presentCodeRedemptionSheet() and showManageSubscriptions() throw METHOD_NOT_AVAILABLE_PLATFORM.
  • In observer mode, purchase(product:) still throws READ_ONLY_PURCHASE_NOT_ALLOWED.

Test prices

Simulated purchases use fixed USD prices:

ProductPrice
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

A subscription without a duration is simulated as monthly, with a warning.

Simulate renewals and refunds

Move a simulated purchase through its lifecycle with the CLI:

voidhash sandbox view user_123
voidhash sandbox renew user_123
voidhash sandbox grace-period user_123
voidhash sandbox expire user_123
voidhash sandbox refund user_123
voidhash sandbox revoke user_123

The CLI isn't published to a package registry yet. The same actions work through the MCP server and the HTTP API; see Simulate renewals, expiry and refunds.

renew, expire and grace-period (3 days) apply to subscriptions, refund to one-time purchases, and revoke to both. Pass the product slug when the person has several. voidhash sandbox reset deletes every simulated purchase in the project; so does Settings → General → Simulated purchases → Delete. Neither touches production, sandbox, Stripe test mode or payment source test purchases. In Studio, choose Test in the environment switcher to see simulated purchases.

Next steps

  • Test purchases (Help center) with App Store sandbox accounts and TestFlight.
  • Connect the App Store (Help center)
  • Make and restore purchases

Something wrong or missing on this page? Tell us by email or on Discord.

PreviousTrack screensNextSwift SDK reference

On this page

Turn it onHow it behavesTest pricesSimulate renewals and refundsNext steps