horse revenue Docs

Tutorial: your first app

Test with Sandbox and TestFlight

Before a build goes to App Review, buy every plan with a Sandbox Apple Account and watch each step arrive in the dashboard. It takes about fifteen minutes.

#Before you start

  • Create a Sandbox Apple Account in App Store Connect under Users and Access → Sandbox. On the device, sign in to it under Settings → App Store → Sandbox Account.
  • Use a TestFlight build or a build from Xcode on a device. The simulator with a StoreKit configuration file works for the UI, but its purchases never reach Apple's servers, so Horse can't verify them.
  • Set logLevel: .debug and watch the console filtered to com.horse.sdk.
  • In the dashboard, switch Show to Sandbox (test). Sandbox purchases unlock the app but never count in revenue.

#The checks

  1. Notifications

    On App Store notifications, Send test (Sandbox) says it was received.

  2. Buy

    Buy each plan once. The customer appears under Customers with a Sandbox badge, an INITIAL_PURCHASE and an active entitlement. The app unlocks without a relaunch.

  3. Cancel and expire

    Turn auto-renew off under Settings → App Store → Sandbox Account → Manage. A CANCELLATION arrives within a minute. Sandbox subscriptions renew every few minutes, so wait for the expiry and check that the app locks.

  4. Restore and reinstall

    Delete the app and install it again. It starts locked until you tap Restore. That's the default, so testers see the paywall again and reinstalls stay honest. See restoring.

  5. Paywall

    Each placement opens the paywall you expect. The free-trial wording disappears for an account that has already used the trial.

  6. Integrations

    If you set up webhooks, their deliveries are answered with a 2xx status. If you set up Meta, its recent deliveries show the sandbox purchase.

A customer's page with an active pro entitlement and the subscription's history, in the demo workspace.
A customer's page with an active pro entitlement and the subscription's history, in the demo workspace.

#If a purchase doesn't unlock

Troubleshooting lists the usual causes. The most common are a product that isn't mapped to the entitlement, and a package whose product the App Store doesn't return yet.

#What's next

Go live.