Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A simulated version of the iPhone's StoreKit, for testing store UIs on the iPhone Simulator, or even on device without having to set up IAP in Connect.

branch: master
Octocat-spinner-32 SimStoreKit.xcodeproj Separated platform-dependant concerns into new ILSimTransactionSimula… July 13, 2011
Octocat-spinner-32 .gitignore Initial commit. February 02, 2010
Octocat-spinner-32 ILSimSKPayment.h Backport of closed source changes from Mover Store: April 17, 2010
Octocat-spinner-32 ILSimSKPayment.m Backport of closed source changes from Mover Store: April 17, 2010
Octocat-spinner-32 ILSimSKPaymentQueue.h Separated platform-dependant concerns into new ILSimTransactionSimula… July 13, 2011
Octocat-spinner-32 ILSimSKPaymentQueue.m Separated platform-dependant concerns into new ILSimTransactionSimula… July 13, 2011
Octocat-spinner-32 ILSimSKPaymentTransaction.h Backport of closed source changes from Mover Store: April 17, 2010
Octocat-spinner-32 ILSimSKPaymentTransaction.m Backport of closed source changes from Mover Store: April 17, 2010
Octocat-spinner-32 ILSimSKPaymentTransaction_Private.h Initial commit. February 02, 2010
Octocat-spinner-32 ILSimSKProduct.h Backport of closed source changes from Mover Store: April 17, 2010
Octocat-spinner-32 ILSimSKProduct.m Backport of closed source changes from Mover Store: April 17, 2010
Octocat-spinner-32 ILSimSKProduct_Private.h Backport of closed source changes from Mover Store: April 17, 2010
Octocat-spinner-32 ILSimSKProductsRequest.h Backport of closed source changes from Mover Store: April 17, 2010
Octocat-spinner-32 ILSimSKProductsRequest.m Backport of closed source changes from Mover Store: April 17, 2010
Octocat-spinner-32 ILSimSKRequest.h Backport of closed source changes from Mover Store: April 17, 2010
Octocat-spinner-32 ILSimSKRequest.m Backport of closed source changes from Mover Store: April 17, 2010
Octocat-spinner-32 ILSimSKTiers.h Backport of closed source changes from Mover Store: April 17, 2010
Octocat-spinner-32 ILSimSKTiers.m Backport of closed source changes from Mover Store: April 17, 2010
Octocat-spinner-32 ILSimStoreKit.h Backport of closed source changes from Mover Store: April 17, 2010
Octocat-spinner-32 ILSimTransactionSimulator.h Separated platform-dependant concerns into new ILSimTransactionSimula… July 13, 2011
Octocat-spinner-32 ILSimTransactionSimulator.m Separated platform-dependant concerns into new ILSimTransactionSimula… July 13, 2011
Octocat-spinner-32 MainWindow.xib Added test for restoring. February 03, 2010
Octocat-spinner-32 ProduceTiersM.rb Added support for all tiers in USD and CAD stores. Added support for:… February 15, 2010
Octocat-spinner-32 Products.plist MANY bugfixes. February 03, 2010
Octocat-spinner-32 README.md Added license and readme. March 27, 2010
Octocat-spinner-32 SimStoreKit_Prefix.pch Initial commit. February 02, 2010
Octocat-spinner-32 TestApp-Info.plist Added test app, fixed typos, added restoring. February 03, 2010
Octocat-spinner-32 TestApp.h Added test for restoring. February 03, 2010
Octocat-spinner-32 TestApp.m Added test for restoring. February 03, 2010
Octocat-spinner-32 Tiers.json Added support for all tiers in USD and CAD stores. Added support for:… February 15, 2010
Octocat-spinner-32 main.m Added test app, fixed typos, added restoring. February 03, 2010
README.md

Simulated StoreKit

The sources in this repository simulate Apple's StoreKit framework.

First of all, this code is available under the CC0 license (which, to be blunt, means it's public domain). Legalities:

CC0
To the extent possible under law, Emanuele Vulcano has waived all copyright and related or neighboring rights to Simulated StoreKit. This work is published from Italy.

There. Legalities are done. Let's get to it.

What does this do

This code reimplements the contract of Apple's StoreKit framework exactly, except that it prefixes all classes, protocols and constants with ILSim or kILSim (constants only). This can be used to test a IAP app in the simulator, for example, or to provide beta testers a IAP-based app without requiring them to have IAP test accounts or make purchases. Sky's the limit.

Additionally, the ILSimStoreKit.h header includes a set of preprocessor definitions that can be used to switch an app written for StoreKit (using SK… symbols) to SimStoreKit transparently.

How to use it

Write an app that uses StoreKit.

Where you would import StoreKit, replace:

#import <StoreKit/StoreKit.h>

with

#define ILSimReplaceRealStoreKit 1
#import "ILSimStoreKit.h"

Also make sure you compile all the .m files of SimStoreKit in your app, and that all .h files are on the headers path. (The easiest way is to simply drag them all into your project, but see the next section for caveats.)

The library needs to simulate the IAP server using a property list of products, which is set using environment variables (in Xcode, use Project > Edit Active Executable and look in the second tab to set them up). Env variables you can use and the expected format for the products list are documented at the top of ILSimSKPaymentQueue.h.

This is for testing only!

Do not ship apps containing this code! (Duh!) Currently, SimStoreKit does not have a way to remove itself from the build for release builds, so you'll have to make up something on your own (editing the implementation files to have a #if AllowSimStoreKit or other preprocessor tricks are probably the way to go).

Something went wrong with that request. Please try again.