Skip to content

A wrapper for IAPManager that makes in app purchases testable and works in the simulator.

License

Notifications You must be signed in to change notification settings

stefankendall/IAPAdapter

Repository files navigation

IAPAdapter

A small subclass for IAPManager that makes it easy to use with automated testing. Anywhere you would use IAPManager, use IAPAdapter instead.

Usage

1.) Get an instance

[IAPAdapter instance]

2.) Add purchases for unit testing

[[IAPAdapter instance] addPurchase:@"productId"]

[[IAPAdapter instance] hasPurchased:@"productId"] // true

3.) Running in the simulator
Whenever you try to purchase in the simulator, IAPAdapter will immediately succeed and call your success callback.

About

A wrapper for IAPManager that makes in app purchases testable and works in the simulator.

Resources

License

Stars

Watchers

Forks

Packages

No packages published