Skip to content

GameFrameX/com.gameframex.unity.payment.apple

Repository files navigation

Game Frame X Logo

Game Frame X Payment Apple

License Version Unity Version Documentation

All-in-One Solution for Indie Game Development · Empowering Indie Developers' Dreams


Documentation · Quick Start · QQ Group: 467608841 / 233840761


English | 简体中文 | 繁體中文 | 日本語 | 한국어

Project Overview

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

Quick Start

Installation

Choose one of the following methods:

  1. Edit your Unity project's Packages/manifest.json and add the scopedRegistries section:

    {
      "scopedRegistries": [
        {
          "name": "GameFrameX",
          "url": "https://gameframex.upm.alianblank.uk",
          "scopes": [
            "com.gameframex"
          ]
        }
      ],
      "dependencies": {
        "com.gameframex.unity.payment.apple": "1.0.1"
      }
    }

    scopes controls which packages are resolved through this registry. Only packages whose names start with com.gameframex will be fetched from it.

  2. Add to manifest.json dependencies:

    {
       "com.gameframex.unity.payment.apple": "https://github.com/gameframex/com.gameframex.unity.payment.apple.git"
    }
  3. Use Package Manager in Unity with Git URL: https://github.com/gameframex/com.gameframex.unity.payment.apple.git

  4. Clone the repository into your Unity project's Packages directory. It will be loaded automatically.

Usage Examples

Initialize

// Initialize Apple App Store Billing
billingManager.Init(bool isDebug = false, bool isClientVerify = false);

Query Products

// Query one-time products
billingManager.QueryPurchases("inapp");

// Query subscription products
billingManager.QueryPurchases("subs");

Purchase Products

// 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

// Consume purchase (only for consumable products)
billingManager.ConsumePurchase("purchase_token");

Query Purchase History

// Query purchase history for one-time products
billingManager.QueryPurchases("inapp");

// Query purchase history for subscription products
billingManager.QueryPurchases("subs");

Platform Support

Platform Supported
iOS Yes

Changelog

See CHANGELOG.md for details.

Dependencies

Package Description
com.gameframex.unity 1.1.1

Documentation & Resources

Community & Support

  • QQ Group: 467608841 / 233840761

License

See LICENSE.md for license information.

About

Apple App Store in-app purchase plugin for GameFrameX Unity. Wraps StoreKit to provide unified APIs for product queries, purchases, subscriptions, and consumable consumption.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors