Testing Purchases
Test product loading, login, purchases, and restores with local simulation and a service-backed OnsideKit integration.
Use a bundled .storekit file to exercise the purchase lifecycle during development, then verify authentication and payment processing with your service-backed integration.
Local purchase simulation
Pass the configuration file’s base name to initialization:
Onside.initialize(storeKitConfigurationName: "LocalProducts")Products, purchases, and restores use the local simulation. For offline login, leave external login disabled and return .local from OnsideDelegate.onsideLoginMethod().
The simulation uses the same payment queue, transaction states, and observer callbacks. Check product loading, cancellation, transaction finishing, restores, and your handling of storefront changes.
See Local Testing with a .storekit File for setup, supported fields, resetting purchase history, and unavailable APIs.
External-account purchases
Use an iOS build connected to the service to verify external login. A .storekit file does not reproduce a real external profile or its purchase restrictions.
Check the following flows:
A missing external identifier falls back to the selected
.autoor.locallogin route.After external login, subscriptions and non-consumables move to
unsupportedProductIdentifiers.Buying a previously loaded unsupported product fails with
.notSupportedForExternalLoginbefore enqueueing.A consumable purchase without Apple Pay fails with
.applePayRequired.The payment methods manager fails with
.notSupportedForExternalLogin.A successful consumable purchase delivers transaction updates and presents the receipt reminder.
Also check your app’s account-switching behavior: changing or removing the external delegate does not replace an existing SDK session. Sign out before switching the SDK to another account.
Phone login and presentation
The phone-login UI recognizes sandbox phone numbers in the +999 range. Use credentials provided for your service environment; this is not an offline login bypass and does not define a universal verification code.
Test SDK screens from both portrait and landscape host views and, where applicable, while resizing the app’s window. Verify that the host window regains focus and the host’s supported orientations are restored after the SDK UI closes. See The Onside Delegate.
See also
Local Testing — offline purchase simulation.
Apple Pay — configure real payment processing.
OnsideKit vs OnsideKitLite — choose the SDK build.
Debugging & installationId — logs and identifiers.
Last updated
Was this helpful?