1: Getting Started
2: Building Logic
5: Game Mechanics
6: Advanced Topics
7: Testing & Tuning
8: The Last 10%
M1: Mobile - Intro
M2: Mobile - Basics
M3: Mobile - Services
M4: Mobile - Publishing
B: How-To Guides
3.0 Drafts (In Progress)
In-App Purchases are an exciting new way for mobile Stencyl games to monetize and bring success to their creators.
It’s well known that given a free app and a paid app, the free app will be downloaded on average, 10x as much as the paid app. This gives the creator more opportunities to monetize the free app by providing downloadable, supplementary content (new levels or game modes), an unlock for the full game, consumables and much more.
Starting with Stencyl 1.4, iOS developers can add In-App Purchases to their games. Like all things Apple, the devil is entirely in setting up In-App Purchases in iTunes Connect. The amount of Stencyl-specific work is minute in comparison.
What this Primer Covers
This guide will show you how to set up In-App Purchases in iTunes Connect and get you up to the critical point – getting iOS to display its standard prompt for purchasing an item.
Step 1: Go to iTunes Connect
Step 2: Set up a Sandbox Account
Step 3: Set up a new game with IAPs
What if you want to operate on an existing game? You can, but only under certain conditions that Apple dictates. For the sake of keeping this guide simple, I’m not going to cover that case today but will in the full guide.
Step 4: Mark Game as Ready to Upload
When you are ready to proceed, mark the game as Ready to Upload, but do NOT actually submit the binary!
Step 5: Set up Purchases in Stencyl
In a gist, setting up purchases in Stencyl is a simple process.
Here are the exact steps. In this instance, we just want to prompt the player to buy a product.
Don’t test your game quite yet – there’s still one more step to go.
Step 6: Prepare your Device
Step 7: Test it on the device!
Now, run your game on the device.
If everything was properly set up, your app should prompt you to purchase your product. Congratulations!
If you are less fortunate and nothing happens after 10-15 seconds, read on.
Since you are testing on the device, likely through Xcode, you will see the game’s output in the lower pane. If you see something along the lines of “Error [NUM]: Cannot connect to the iTunes Store” , then you know for certain that something didn’t quite go right along the way.
Here’s a list of everything we know that could go wrong.
Out of your control
In your control
If none of these solutions work, ask on the forums. In-App Purchases are challenging to add, not because they’re particularly difficult, but because of the obtuse system of setting them up. Unfortunately, we have little sway in making this process easier, besides documenting every last possibility of failure.
Last Updated: 2013-04-10 by Jon
11323 have read this article
Disclaimer: The Stencyl Team does not actively monitor comments on articles. If you're seeking help for your game, please ask a question on the forums. Thanks!