Adding In-App Purchases to Exported hyperPad Games
hyperPad

Adding In-App Purchases to Exported hyperPad Games

April 16, 2026
MonetizationApp Store
Adding In-App Purchases to Exported hyperPad Games

You add in-app purchases to an exported hyperPad game in Xcode, after Export. hyperPad doesn't have a purchase Behavior in the iPad editor. Instead, you build the game and its locked and open states in hyperPad, Export it with the paid hyperPad app, and then set up products in App Store Connect. Next you write the purchase code with Apple's StoreKit in the exported Xcode project. Then you test every transaction path and submit the app to Apple.

This is native iOS development. Old tutorials that use a Podfile or a third-party StoreKit wrapper may not match the exported project or Apple's current APIs, so check them before you follow along.

Decide what the purchase gives the player

Define what the player gets before you write any code. Apple supports three main product types:

Product typeExampleWhat your game has to handle
ConsumableA pack of CoinsDeliver it once per purchase, every time
Non-consumableA permanent level packRestore access on a new device or after reinstall
SubscriptionOngoing access to new contentCheck whether access is still active

Apple explains each type in its In-App Purchase configuration guide.

Build the access rules in hyperPad first

Build the game with both states in hyperPad: the free content and the paid content. Store access in an Attribute, such as levelPackOwned, and use conditions to check it before a paid level opens.

While you test, add a temporary developer button that flips that Attribute. It lets you play both states without any purchase code. Remove the button before your release build.

Export and add StoreKit in Xcode

Once the game works, you need:

  • the paid hyperPad app, for Export
  • a Mac with Xcode
  • an Apple Developer account
  • an app record in App Store Connect, with your products set up

Apple's StoreKit 2 APIs load products, process transactions, verify purchases and report what the player currently owns. Your code then needs to tell the game to update the access Attribute you built in hyperPad.

The exact code depends on your exported project and your products. A copied sample won't fit every game. Plan for product IDs, transaction verification, delivering the purchase, restores, interrupted transactions and offline play.

Test the failure paths

Use Xcode's StoreKit testing tools and Apple's sandbox before you submit.

TestExpected result
Successful purchaseThe content opens once
Cancelled purchaseNothing opens, and the game still works
Pending transactionThe game waits and doesn't grant access early
Reinstall or new deviceRestorable purchases come back
Network dropThe game stays in a safe, clear state

Never show a purchase button that doesn't work. If a product fails to load, hide or disable the button and keep the free game playable.

Submit to Apple

The hyperPad Xcode submission guide covers archiving and uploading. Check Apple's In-App Purchase documentation and App Review Guidelines while you build, because the rules change.

To compare in-app purchases with paid downloads and ads, read how to monetize your game.

Your next step

Open your Project and add one access Attribute for the content you plan to sell. Build both states and test them with a developer button. Once both feel right, you're ready to Export and start the StoreKit work.

hyperPad Starter

Make Your First Game on iPad

Start with one free project in hyperPad Starter. Drag, drop, and connect Behaviors to build your game without traditional code.

Try hyperPad Starter

Free to download · One project included