lib_unity_purchase/Samples~/Apple App Store - 03 Handli...
刘涛 3b87d20391 全部提交 2024-01-29 18:49:33 +08:00
..
.sample.json 全部提交 2024-01-29 18:49:33 +08:00
HandlingDeferredPurchases.cs 全部提交 2024-01-29 18:49:33 +08:00
HandlingDeferredPurchases.cs.meta 全部提交 2024-01-29 18:49:33 +08:00
HandlingDeferredPurchases.unity 全部提交 2024-01-29 18:49:33 +08:00
HandlingDeferredPurchases.unity.meta 全部提交 2024-01-29 18:49:33 +08:00
README.md 全部提交 2024-01-29 18:49:33 +08:00
README.md.meta 全部提交 2024-01-29 18:49:33 +08:00
UserWarningAppleAppStore.cs 全部提交 2024-01-29 18:49:33 +08:00
UserWarningAppleAppStore.cs.meta 全部提交 2024-01-29 18:49:33 +08:00

README.md

README - In-App Purchasing Sample Scenes - Apple App Store - Handling Deferred Purchases

This sample showcases how to handle deferred purchases using IAppleExtensions.RegisterPurchaseDeferredListener and test using IAppleExtensions.simulateAskToBuy.

Instructions to test this sample:

  1. If testing with Sandbox, have in-app purchasing correctly configured with the Apple App Store.
  2. Configure a non-consumable product.
  3. Set your own product's id in the InAppPurchasing game object > Refreshing App Receipt script > No Ads Product Id field or change the goldProductId field in the HandlingDeferredPurchases.cs script.
  4. Build your project for iOS.
    1. If you are using a simulator with Xcode 12+, follow these instructions to set up StoreKit Testing. (We recommend using Storekit Testing if possible. Testing in Sandbox will not allow you to approve or reject Ask to Buy transactions.)
    2. In order to test deferred purchases using Storekit Testing, select Editor > Enable Ask to Buy. To approve and decline transactions, navigate to Debug > StoreKit > Manage Transactions. Right click on pending transactions to approve or decline.

Apple Deferred Purchases and Ask to Buy

To learn more about Ask to Buy, please see Request and make purchases with Ask to Buy and the SKPaymentTransactionState.deferred documentation from Apple.