All-in-One Solution for Indie Game Development · Empowering Indie Developers' Dreams
Documentation · Quick Start · QQ Group: 467608841 / 233840761
This plugin provides a simple and easy-to-use API for integrating Apple App Store in-app purchase functionality into Unity applications. It encapsulates the complexity of StoreKit and provides a unified interface, enabling developers to easily implement:
- Initialize Apple App Store Billing
- Query product details
- Purchase products (one-time products and subscriptions)
- Consume purchases (consumable products)
- Query purchase history
Choose one of the following methods:
-
Edit your Unity project's
Packages/manifest.jsonand add thescopedRegistriessection:{ "scopedRegistries": [ { "name": "GameFrameX", "url": "https://gameframex.upm.alianblank.uk", "scopes": [ "com.gameframex" ] } ], "dependencies": { "com.gameframex.unity.payment.apple": "1.0.1" } }scopescontrols which packages are resolved through this registry. Only packages whose names start withcom.gameframexwill be fetched from it. -
Add to
manifest.jsondependencies:{ "com.gameframex.unity.payment.apple": "https://github.com/gameframex/com.gameframex.unity.payment.apple.git" } -
Use Package Manager in Unity with Git URL:
https://github.com/gameframex/com.gameframex.unity.payment.apple.git -
Clone the repository into your Unity project's
Packagesdirectory. It will be loaded automatically.
// Initialize Apple App Store Billing
billingManager.Init(bool isDebug = false, bool isClientVerify = false);// Query one-time products
billingManager.QueryPurchases("inapp");
// Query subscription products
billingManager.QueryPurchases("subs");// Purchase a one-time product
billingManager.BuyInApp("product_id", "order_id");
// Purchase a subscription product
billingManager.BuySubs("subscription_id", "order_id");
// Purchase a subscription product with an offer
billingManager.BuySubs("subscription_id", "order_id", "offer_token");// Consume purchase (only for consumable products)
billingManager.ConsumePurchase("purchase_token");// Query purchase history for one-time products
billingManager.QueryPurchases("inapp");
// Query purchase history for subscription products
billingManager.QueryPurchases("subs");| Platform | Supported |
|---|---|
| iOS | Yes |
See CHANGELOG.md for details.
| Package | Description |
|---|---|
com.gameframex.unity |
1.1.1 |
- QQ Group: 467608841 / 233840761
See LICENSE.md for license information.