Skip to content

Commit

Permalink
Prep for release 3.10.0 (RevenueCat#345)
Browse files Browse the repository at this point in the history
Co-authored-by: Cesar de la Vega <[email protected]>
  • Loading branch information
beylmk and vegaro authored Apr 18, 2022
1 parent 664b13c commit 864b47a
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 21 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG-LATEST.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.9.5
## 3.10.0

- Add instructions for how to install Amazon Store version in README (https://github.com/RevenueCat/purchases-flutter/pull/330)
- Add support for iOS promoted purchases (https://github.com/RevenueCat/purchases-flutter/pull/344)
New type: ReadyForPromotedProductPurchaseListener
New methods: addReadyForPromotedProductPurchaseListener(ReadyForPromotedProductPurchaseListener listener)
removeReadyForPromotedProductPurchaseListener(ReadyForPromotedProductPurchaseListener listenerToRemove)

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 3.10.0

- Add support for iOS promoted purchases (https://github.com/RevenueCat/purchases-flutter/pull/344)
New type: `ReadyForPromotedProductPurchaseListener`
New methods: `addReadyForPromotedProductPurchaseListener(ReadyForPromotedProductPurchaseListener listener)`
`removeReadyForPromotedProductPurchaseListener(ReadyForPromotedProductPurchaseListener listenerToRemove)`

## 3.9.5

- Add instructions for how to install Amazon Store version in README (https://github.com/RevenueCat/purchases-flutter/pull/330)
Expand Down
1 change: 1 addition & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
| Version | iOS version | Android version | Common files version |
|---------|-------------|-----------------|----------------------|
| 3.10.0 | 3.13.2 | 4.6.1 | 1.11.2 |
| 3.9.5 | 3.13.2 | 4.6.1 | 1.11.2 |
| 3.9.4 | 3.13.2 | 4.6.1 | 1.11.2 |
| 3.9.3 | 3.13.2 | 4.6.1 | 1.11.2 |
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'com.revenuecat.purchases_flutter'
version '3.9.5'
version '3.10.0'

buildscript {
ext.kotlin_version = '1.3.72'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class PurchasesFlutterPlugin implements FlutterPlugin, MethodCallHandler,
@Nullable private Activity activity;

private static final String PLATFORM_NAME = "flutter";
private static final String PLUGIN_VERSION = "3.9.5";
private static final String PLUGIN_VERSION = "3.10.0";

/**
* Plugin registration.
Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/PurchasesFlutterPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ - (NSString *)platformFlavor {
}

- (NSString *)platformFlavorVersion {
return @"3.9.5";
return @"3.10.0";
}

@end
2 changes: 1 addition & 1 deletion ios/purchases_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
Pod::Spec.new do |s|
s.name = 'purchases_flutter'
s.version = '3.9.5'
s.version = '3.10.0'
s.summary = 'Cross-platform subscriptions framework for Flutter.'
s.description = <<-DESC
Client for the RevenueCat subscription and purchase tracking system, making implementing in-app subscriptions in Flutter easy - receipt validation and status tracking included!
Expand Down
26 changes: 14 additions & 12 deletions lib/purchases_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ typedef PurchaserInfoUpdateListener = void Function(
/// ### Related Articles:
/// - [Apple Documentation](https://rev.cat/testing-promoted-in-app-purchases)
typedef ReadyForPromotedProductPurchaseListener = void Function(
String productIdentifier,
Future<PromotedPurchaseResult> Function() startPurchase,
String productIdentifier,
Future<PromotedPurchaseResult> Function() startPurchase,
);

/// Entry point for Purchases.
class Purchases {
static final Set<PurchaserInfoUpdateListener> _purchaserInfoUpdateListeners =
{};

static final Set<ReadyForPromotedProductPurchaseListener> _readyForPromotedProductPurchaseListeners =
{};
static final Set<ReadyForPromotedProductPurchaseListener>
_readyForPromotedProductPurchaseListeners = {};

static final _channel = const MethodChannel('purchases_flutter')
..setMethodCallHandler((call) async {
Expand All @@ -57,7 +57,8 @@ class Purchases {
final args = Map<String, dynamic>.from(call.arguments);
final callbackID = args['callbackID'];
final productIdentifier = args['productID'];
listener(productIdentifier, () => _startPromotedProductPurchase(callbackID));
listener(productIdentifier,
() => _startPromotedProductPurchase(callbackID),);
}
break;
}
Expand Down Expand Up @@ -146,8 +147,8 @@ class Purchases {
///
/// [listener] ReadyForPromotedProductPurchaseListener to be added
static void addReadyForPromotedProductPurchaseListener(
ReadyForPromotedProductPurchaseListener listener,
) {
ReadyForPromotedProductPurchaseListener listener,
) {
_readyForPromotedProductPurchaseListeners.add(listener);
}

Expand All @@ -156,8 +157,8 @@ class Purchases {
///
/// [listener] ReadyForPromotedProductPurchaseListener to be removed
static void removeReadyForPromotedProductPurchaseListener(
ReadyForPromotedProductPurchaseListener listenerToRemove,
) =>
ReadyForPromotedProductPurchaseListener listenerToRemove,
) =>
_readyForPromotedProductPurchaseListeners.remove(listenerToRemove);

/// Deprecated in favor of set<NetworkId> functions.
Expand Down Expand Up @@ -690,7 +691,8 @@ class Purchases {
/// `callbackID` index in PurchasesFlutterPlugin.m's `startPurchaseBlocks`
/// array.
static Future<PromotedPurchaseResult> _startPromotedProductPurchase(
int callbackID,) async {
int callbackID,
) async {
final result = await _channel.invokeMethod(
'startPromotedProductPurchase',
{
Expand Down Expand Up @@ -874,7 +876,7 @@ class PromotedPurchaseResult {

/// Constructs a PromotedPurchaseResult with its properties
PromotedPurchaseResult({
required this.productIdentifier,
required this.purchaserInfo,
required this.productIdentifier,
required this.purchaserInfo,
});
}
2 changes: 1 addition & 1 deletion macos/purchases_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'purchases_flutter'
s.version = '3.9.5'
s.version = '3.10.0'
s.summary = 'Cross-platform subscriptions framework for Flutter.'
s.description = <<-DESC
Client for the RevenueCat subscription and purchase tracking system, making implementing in-app subscriptions in Flutter easy - receipt validation and status tracking included!
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: purchases_flutter
description: A Flutter plugin that makes it simple to add and manage in-app
purchases (IAP) and subscriptions. Supports Android, iOS, macOS, iPadOS, and
watchOS.
version: 3.9.5
version: 3.10.0
homepage: https://www.revenuecat.com/
repository: https://github.com/RevenueCat/purchases-flutter
issue_tracker: https://github.com/RevenueCat/purchases-flutter/issues
Expand Down
2 changes: 1 addition & 1 deletion revenuecat_examples/purchase_tester/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class _MyAppState extends State<InitialScreen> {
final purchaserInfo = await Purchases.getPurchaserInfo();

Purchases.addReadyForPromotedProductPurchaseListener(
(productID, startPurchase) async {
(productID, startPurchase) async {
print('Received readyForPromotedProductPurchase event for '
'productID: $productID');

Expand Down

0 comments on commit 864b47a

Please sign in to comment.