com.unity.purchasing 4.12.0
Source docsNotes: processedReleased June 5, 2024
Unity Compatibility
Minimum Unity: 2020.3
Package Dependencies
- com.unity.modules.androidjni (1.0.0)
- com.unity.modules.jsonserialize (1.0.0)
- com.unity.modules.unitywebrequest (1.0.0)
- com.unity.services.core (1.12.5)
- com.unity.ugui (1.0.0)
✨ Features
- GooglePlay - `IGooglePlayStoreExtensions.GetObfuscatedAccountId(Product product)` has been added to obtain the obfuscated account ID of the purchase set with `IGooglePlayConfiguration.SetObfuscatedAccountId`.
- GooglePlay - `IGooglePlayStoreExtensions.GetObfuscatedProfileId(Product product)` has been added to obtain the obfuscated profile ID of the purchase set with `IGooglePlayConfiguration.SetObfuscatedProfileId`.
- Apple - Added visionOS support
📈 Improvements
- Upgraded `com.unity.services.core` from 1.8.2 to 1.12.5 to include their Apple privacy manifest.
- GooglePlay - Dependencies are now injected in the gradle files. The Billing aar is no longer included.
- GooglePlay - Billing Library updated to 6.2.1 (was previously 5.2.1). No new feature support was added. Subscriptions must still have only 1 base plan.
- GooglePlay - Updated the internal implementation to use `productDetails` instead of `skuDetails` to solve the `setOfferToken` warning issued by Google.
- GooglePlay - `IGooglePlayStoreExtensions.GetPurchaseState(Product product)` has been updated to use the getPurchaseState() instead of getOriginalJson(). This change will make the purchase state more reliable.
- GooglePlay - `IGooglePlayStoreExtensions.ConfirmSubscriptionPriceChange` has been marked `[Obsolete]` as it is no longer supported since Google Play Billing Library 6.0.0. For alternatives, see the price changes guide.
- GooglePlay - `IStoreListener.OnInitializeFailed` for `InitializationFailureReason.PurchasingUnavailable` will now return the BillingResponseCode when product retrieval is successful, but an error occured and no products were returned.
🔧 Bug Fixes
- Fixed `OnPurchaseFailed` - It now returns the `productId` (previously the `transactionId`) in the `PurchaseFailureDescription` when the product isn't available for purchase.
- Fixed a NullReferenceException when retrieving products on Unity Engine 2020.
⚡ API Changes
- GooglePlay - The `iconUrl` and `skuDetailsToken` sub-entry to the `Product.receipt`'s `"Payload"`'s `"skuDetails"` will now return an empty string since they are no longer supported.
