Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 71496dc

Browse files
authored
[in_app_purchase]Update the version number and CHANGELOG (#4097)
1 parent 355d51b commit 71496dc

File tree

4 files changed

+11
-26
lines changed

4 files changed

+11
-26
lines changed

packages/in_app_purchase/in_app_purchase/CHANGELOG.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
## NEXT
2-
3-
* Fixes integration tests.
4-
* Updates example app Android compileSdkVersion to 31.
1+
## 2.0.0
52

63
* **BREAKING CHANGES**:
4+
* Adds a new `PurchaseStatus` named `canceled`. This means developers can distinguish between an error and user cancellation.
5+
* Updates `restorePurchases` to emit an empty list of purchases on StoreKit when there are no purchases to restore (same as Android).
76
* Renames `in_app_purchase_ios` to `in_app_purchase_storekit`.
87
* Renames `InAppPurchaseIosPlatform` to `InAppPurchaseStoreKitPlatform`.
98
* Renames `InAppPurchaseIosPlatformAddition` to
109
`InAppPurchaseStoreKitPlatformAddition`.
1110

11+
* Deprecates the `InAppPurchaseAndroidPlatformAddition.enablePendingPurchases()` method and `InAppPurchaseAndroidPlatformAddition.enablePendingPurchase` property.
12+
* Adds support for promotional offers on the store_kit_wrappers Dart API.
13+
* Fixes integration tests.
14+
* Updates example app Android compileSdkVersion to 31.
15+
1216
## 1.0.9
1317

1418
* Handle purchases with `PurchaseStatus.restored` correctly in the example App.

packages/in_app_purchase/in_app_purchase/example/integration_test/in_app_purchase_test.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,14 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import 'dart:io';
6-
75
import 'package:flutter_test/flutter_test.dart';
86
import 'package:in_app_purchase/in_app_purchase.dart';
9-
import 'package:in_app_purchase_android/in_app_purchase_android.dart';
107
import 'package:integration_test/integration_test.dart';
118

129
void main() {
1310
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
1411

1512
testWidgets('Can create InAppPurchase instance', (WidgetTester tester) async {
16-
if (Platform.isAndroid) {
17-
// https://github.com/flutter/flutter/issues/93837
18-
InAppPurchaseAndroidPlatformAddition.enablePendingPurchases();
19-
}
2013
final InAppPurchase iapInstance = InAppPurchase.instance;
2114
expect(iapInstance, isNotNull);
2215
});

packages/in_app_purchase/in_app_purchase/example/lib/main.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import 'dart:async';
66
import 'dart:io';
7-
import 'package:flutter/foundation.dart';
87
import 'package:flutter/material.dart';
98
import 'package:in_app_purchase/in_app_purchase.dart';
109
import 'package:in_app_purchase_android/billing_client_wrappers.dart';
@@ -16,13 +15,6 @@ import 'consumable_store.dart';
1615
void main() {
1716
WidgetsFlutterBinding.ensureInitialized();
1817

19-
if (defaultTargetPlatform == TargetPlatform.android) {
20-
// For play billing library 2.0 on Android, it is mandatory to call
21-
// [enablePendingPurchases](https://developer.android.com/reference/com/android/billingclient/api/BillingClient.Builder.html#enablependingpurchases)
22-
// as part of initializing the app.
23-
InAppPurchaseAndroidPlatformAddition.enablePendingPurchases();
24-
}
25-
2618
runApp(_MyApp());
2719
}
2820

packages/in_app_purchase/in_app_purchase/pubspec.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: in_app_purchase
22
description: A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the App Store and Google Play.
33
repository: https://github.com/flutter/plugins/tree/master/packages/in_app_purchase/in_app_purchase
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
5-
version: 1.0.9
6-
# Temporarily disable publishing until in_app_purchase_storekit is published.
7-
publish_to: none
5+
version: 2.0.0
86

97
environment:
108
sdk: ">=2.12.0 <3.0.0"
@@ -22,10 +20,8 @@ dependencies:
2220
flutter:
2321
sdk: flutter
2422
in_app_purchase_platform_interface: ^1.0.0
25-
in_app_purchase_android: ^0.1.5
26-
# Temporary path-based dependency to allow for renaming.
27-
in_app_purchase_storekit:
28-
path: ../in_app_purchase_storekit
23+
in_app_purchase_android: ^0.2.1
24+
in_app_purchase_storekit: ^0.2.0
2925

3026
dev_dependencies:
3127
flutter_driver:

0 commit comments

Comments
 (0)