# Changelog ## [4.2.1] - 2022-06-14 ### Fixed - Downgrade `com.unity.services.core` from 1.4.1 to 1.3.1 due to a new bug found in 1.4.1 ## [4.2.0] - 2022-06-13 ### Added - Feature to automatically initialize **Unity Gaming Services** through the catalog UI. Please see the [documentation](https://docs.unity3d.com/Packages/com.unity.purchasing@4.2/manual/UnityIAPInitializeUnityGamingServices.html) for more details. ### Changed - The In-App Purchasing package now requires **Unity Gaming Services** to have been initialized before it can be used. For the time being **IAP** will continue working as usual, but will log a warning if **Unity Gaming Services** has not been initialized. In future releases of this package, initializing **Unity Gaming Services** will be mandatory. Please see the [documentation](https://docs.unity3d.com/Packages/com.unity.purchasing@4.2/manual/UnityIAPInitializeUnityGamingServices.html) for more details. ## [4.2.0-pre.2] - 2022-04-28 ### Added - Support for Unity Analytics TransactionFailed event. - Sample showcasing how to initialize [Unity Gaming Services](https://unity.com/solutions/gaming-services) using the [Services Core API](https://docs.unity.com/ugs-overview/services-core-api.html) ### Changed - The Analytics notice in the In-App Purchasing service window has been removed for Unity Editors 2022 and up. ## [4.2.0-pre.1] - 2022-04-07 ### Added - Support for the [new Unity Analytics](https://unity.com/products/unity-analytics) [transaction event](https://docs.unity.com/analytics/AnalyticsSDKAPI.html#Transaction). - The package will now send telemetry diagnostic and metric events to help improve the long-term reliability and performance of the package. ### Changed - The minimum Unity Editor version supported is 2020.3. - The In-App Purchasing service window now links to the [new Unity Dashboard](https://dashboard.unity3d.com/) for Unity Editors 2022 and up. ### Fixed - GooglePlay - Fixed OnInitializeFailed never called if GooglePlay BillingClient is not ready during initialization. - GooglePlay - GoogleBilling is allowed to initialize correctly even if the user's Google account is logged out, so long as it is linked. The user will need to log in to their account to continue making purchases. - Fixed a build error `DirectoryNotFoundException` that occurred when the build platform was iOS or tvOS and the build target was another platform. ## [4.1.5] - 2022-05-17 ### Fixed - GooglePlay - Fixed a null reference exception introduced in Unity IAP 4.1.4 that could happen when cancelling an in-app purchase. ## [4.1.4] - 2022-03-30 ### Fixed - GooglePlay - Fixed issue where if an app is backgrounded while a purchase is being processed, an `OnPurchaseFailed` would be called with the purchase failure reason `UserCancelled`, even if the purchase was successful. ## [4.1.3] - 2022-01-11 ### Fixed - Removed deprecated UnityWebRequest calls, updating them to use safer ones. This avoids compiler warnings that may occur. - Fixed a serious edge case where Apple StoreKit receipt parsing might fail, preventing validation. A portion of receipts on iOS could be affected and cause Unity IAP to freeze after the purchase completed, but before the SDK can finalize the purchase. The user will have to uninstall and reinstall your app in order to recover from this. Your customer service will have to refund the user's purchase or apply the purchase in some other way outside of Unity IAP. This bug was accidentally introduced in Unity IAP 4.1.0. To avoid encountering this problem with your app, we suggest you update to this version. ## [4.1.2] - 2021-11-15 ### Fixed - Various internal obsolete warnings have been removed, allowing the project to be compiled with errors as warnings enabled. ## [4.1.1] - 2021-10-28 ### Changed - A default store will be selected for each platform. For Android the default store will be Google. All other platforms already had default stores. ## [4.1.0] - 2021-09-20 ### Added - Apple - Add support for receipt validation with [StoreKit Test](https://developer.apple.com/documentation/Xcode/setting-up-storekit-testing-in-xcode). See the [Receipt Validation Obfuscator manual](https://docs.unity3d.com/Packages/com.unity.purchasing@4.0/manual/UnityIAPValidatingReceipts.html) for a usage recommendation. See also the [sample](https://docs.unity3d.com/Packages/com.unity.purchasing@4.0/manual/Overview.html#learn-more) "05 Local Receipt Validation" for an example. - GooglePlay - Add support for controlling automatic fetching of purchases at initialization, with `IGooglePlayConfiguration.SetFetchPurchasesAtInitialize(bool)`. Use to help distinguish previously seen purchases from new purchases. Then to fetch previously seen purchases use `IGooglePlayExtensions.RestorePurchases(Action)`. ### Changed - Menu items for this package were renamed from *Unity IAP -> In-App Purchasing* and have been moved from *Window > Unity IAP* to *Services > In-App Purchasing*. - Choosing an Android app store target before building the Android Build Target is now required. A build error will be emitted otherwise. Set this with the Store Selector window (*Services > In-App Purchasing > Switch Store ...*) or the API (`UnityPurchasingEditor.TargetAndroidStore()`). The default Android app store is now AppStore.NotSpecified and is visible in the window as `