[in_app_purchase]Update the version number and CHANGELOG (#4097)
diff --git a/packages/in_app_purchase/in_app_purchase/CHANGELOG.md b/packages/in_app_purchase/in_app_purchase/CHANGELOG.md
index 39d8ce8..9e82ebd 100644
--- a/packages/in_app_purchase/in_app_purchase/CHANGELOG.md
+++ b/packages/in_app_purchase/in_app_purchase/CHANGELOG.md
@@ -1,14 +1,18 @@
-## NEXT
-
-* Fixes integration tests.
-* Updates example app Android compileSdkVersion to 31.
+## 2.0.0
* **BREAKING CHANGES**:
+ * Adds a new `PurchaseStatus` named `canceled`. This means developers can distinguish between an error and user cancellation.
+ * Updates `restorePurchases` to emit an empty list of purchases on StoreKit when there are no purchases to restore (same as Android).
* Renames `in_app_purchase_ios` to `in_app_purchase_storekit`.
* Renames `InAppPurchaseIosPlatform` to `InAppPurchaseStoreKitPlatform`.
* Renames `InAppPurchaseIosPlatformAddition` to
`InAppPurchaseStoreKitPlatformAddition`.
+* Deprecates the `InAppPurchaseAndroidPlatformAddition.enablePendingPurchases()` method and `InAppPurchaseAndroidPlatformAddition.enablePendingPurchase` property.
+* Adds support for promotional offers on the store_kit_wrappers Dart API.
+* Fixes integration tests.
+* Updates example app Android compileSdkVersion to 31.
+
## 1.0.9
* Handle purchases with `PurchaseStatus.restored` correctly in the example App.
diff --git a/packages/in_app_purchase/in_app_purchase/example/integration_test/in_app_purchase_test.dart b/packages/in_app_purchase/in_app_purchase/example/integration_test/in_app_purchase_test.dart
index 55ad122..437ee99 100644
--- a/packages/in_app_purchase/in_app_purchase/example/integration_test/in_app_purchase_test.dart
+++ b/packages/in_app_purchase/in_app_purchase/example/integration_test/in_app_purchase_test.dart
@@ -2,21 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-import 'dart:io';
-
import 'package:flutter_test/flutter_test.dart';
import 'package:in_app_purchase/in_app_purchase.dart';
-import 'package:in_app_purchase_android/in_app_purchase_android.dart';
import 'package:integration_test/integration_test.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
testWidgets('Can create InAppPurchase instance', (WidgetTester tester) async {
- if (Platform.isAndroid) {
- // https://github.com/flutter/flutter/issues/93837
- InAppPurchaseAndroidPlatformAddition.enablePendingPurchases();
- }
final InAppPurchase iapInstance = InAppPurchase.instance;
expect(iapInstance, isNotNull);
});
diff --git a/packages/in_app_purchase/in_app_purchase/example/lib/main.dart b/packages/in_app_purchase/in_app_purchase/example/lib/main.dart
index 0bdcfc3..5d2f04c 100644
--- a/packages/in_app_purchase/in_app_purchase/example/lib/main.dart
+++ b/packages/in_app_purchase/in_app_purchase/example/lib/main.dart
@@ -4,7 +4,6 @@
import 'dart:async';
import 'dart:io';
-import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:in_app_purchase/in_app_purchase.dart';
import 'package:in_app_purchase_android/billing_client_wrappers.dart';
@@ -16,13 +15,6 @@
void main() {
WidgetsFlutterBinding.ensureInitialized();
- if (defaultTargetPlatform == TargetPlatform.android) {
- // For play billing library 2.0 on Android, it is mandatory to call
- // [enablePendingPurchases](https://developer.android.com/reference/com/android/billingclient/api/BillingClient.Builder.html#enablependingpurchases)
- // as part of initializing the app.
- InAppPurchaseAndroidPlatformAddition.enablePendingPurchases();
- }
-
runApp(_MyApp());
}
diff --git a/packages/in_app_purchase/in_app_purchase/pubspec.yaml b/packages/in_app_purchase/in_app_purchase/pubspec.yaml
index 89a2c75..72fac1d 100644
--- a/packages/in_app_purchase/in_app_purchase/pubspec.yaml
+++ b/packages/in_app_purchase/in_app_purchase/pubspec.yaml
@@ -2,9 +2,7 @@
description: A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the App Store and Google Play.
repository: https://github.com/flutter/plugins/tree/master/packages/in_app_purchase/in_app_purchase
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
-version: 1.0.9
-# Temporarily disable publishing until in_app_purchase_storekit is published.
-publish_to: none
+version: 2.0.0
environment:
sdk: ">=2.12.0 <3.0.0"
@@ -22,10 +20,8 @@
flutter:
sdk: flutter
in_app_purchase_platform_interface: ^1.0.0
- in_app_purchase_android: ^0.1.5
- # Temporary path-based dependency to allow for renaming.
- in_app_purchase_storekit:
- path: ../in_app_purchase_storekit
+ in_app_purchase_android: ^0.2.1
+ in_app_purchase_storekit: ^0.2.0
dev_dependencies:
flutter_driver: