Skip to content

Commit

Permalink
Release: 3.1.0 (#171)
Browse files Browse the repository at this point in the history
* slight updates to RELEASING.md

* bumped to 3.1.0 and added changelog

* bumped purchases-hybrid-common to 1.6.0

* updated VERSIONS file

* wired in the simulatesAskToBuyInSandbox method for iOS

* added no-op simulatesAskToBuyInSandbox in Android

* updated copy for setSimulatesAskToBuyInSandbox and changelog

* added "iOS only" to clarify usage of setSimulatesAskToBuyInSandbox

* bumped common version to 1.6.1

* updated Podfile and added explicit handling of paymentPendingError

* updated RELEASING.md, flutter format
  • Loading branch information
aboedo authored Mar 15, 2021
1 parent d428544 commit 982ba8e
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 31 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG-LATEST.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## 3.0.2
## 3.1.0

- Fixes versions number in plugin files
https://github.com/RevenueCat/purchases-flutter/pull/166
- iOS:
- Added a new property `simulateAsksToBuyInSandbox`, that allows developers to test deferred purchases easily.
- Bumped purchases-hybrid-common to 1.6.1 [Changelog here](https://github.com/RevenueCat/purchases-hybrid-common/releases/1.6.1)
- Bumped purchases-ios to 3.10.6 [Changelog here](https://github.com/RevenueCat/purchases-ios/releases/3.10.6)
- Bumped purchases-android to 4.0.4 [Changelog here](https://github.com/RevenueCat/purchases-hybrid-common/releases/4.0.4)
https://github.com/RevenueCat/purchases-flutter/pull/171
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 3.1.0

- iOS:
- Added a new method `setSimulatesAskToBuyInSandbox`, that allows developers to test deferred purchases easily.
- Bumped purchases-hybrid-common to 1.6.1 [Changelog here](https://github.com/RevenueCat/purchases-hybrid-common/releases/1.6.1)
- Bumped purchases-ios to 3.10.6 [Changelog here](https://github.com/RevenueCat/purchases-ios/releases/3.10.6)
- Bumped purchases-android to 4.0.4 [Changelog here](https://github.com/RevenueCat/purchases-hybrid-common/releases/4.0.4)
https://github.com/RevenueCat/purchases-flutter/pull/171

## 3.0.2

- Fixes versions number in plugin files
Expand Down
6 changes: 3 additions & 3 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
1. Start a branch `bump/x.x.x`
1. Update to the latest SDK versions in purchases_flutter.podspec and build.gradle.
1. Start a branch `release/x.x.x`
1. Update to the latest SDK versions in ios/purchases_flutter.podspec, mac/purchases_flutter.podspec and build.gradle.
1. Run `flutter format .`
1. Update versions in VERSIONS.md.
1. Update CHANGELOG-LATEST.md with the changes for the current version (to be used by Fastlane for the github release notes)
1. Run `bundle exec fastlane bump_and_update_changelog version:X.Y.Z` (where X.Y.Z is the new version) to update the version number in pubspec.yaml, purchases_flutter.podspec and android/build.gradle.
1. `flutter pub pub publish --dry-run`
1. `git commit -am "Preparing for version x.y.z"`
1. Commit the changes, open a PR, merge when ready
1. `git tag x.y.z`
1. `git push origin master && git push --tags`
1. Create a new release in github and upload
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.1.0 | 3.10.6 | 4.0.4 | 1.6.1 |
| 3.0.2 | 3.9.2 | 4.0.1 | 1.5.0 |
| 3.0.1 | 3.9.2 | 4.0.1 | 1.5.0 |
| 3.0.0 | 3.9.2 | 4.0.1 | 1.5.0 |
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'com.revenuecat.purchases_flutter'
version '3.0.2'
version '3.1.0'

buildscript {
ext.kotlin_version = '1.3.72'
Expand Down Expand Up @@ -38,5 +38,5 @@ android {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.revenuecat.purchases:purchases-hybrid-common:1.5.0"
implementation "com.revenuecat.purchases:purchases-hybrid-common:1.6.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,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.0.2";
private static final String PLUGIN_VERSION = "3.1.0";

/**
* Plugin registration.
Expand Down Expand Up @@ -218,6 +218,9 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
case "presentCodeRedemptionSheet":
// NOOP
break;
case "setSimulatesAskToBuyInSandbox":
// NOOP
break;
case "setAttributes":
Map<String, String> attributes = call.argument("attributes");
setAttributes(attributes, result);
Expand Down
26 changes: 13 additions & 13 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ PODS:
- Flutter (1.0.0)
- integration_test (0.0.1):
- Flutter
- Purchases (3.9.2):
- PurchasesCoreSwift (= 3.9.2)
- purchases_flutter (2.0.3):
- Purchases (3.10.6):
- PurchasesCoreSwift (= 3.10.6)
- purchases_flutter (3.1.0):
- Flutter
- PurchasesHybridCommon (= 1.5.0)
- PurchasesCoreSwift (3.9.2)
- PurchasesHybridCommon (1.5.0):
- Purchases (= 3.9.2)
- PurchasesHybridCommon (= 1.6.1)
- PurchasesCoreSwift (3.10.6)
- PurchasesHybridCommon (1.6.1):
- Purchases (= 3.10.6)

DEPENDENCIES:
- Flutter (from `Flutter`)
Expand All @@ -31,13 +31,13 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/purchases_flutter/ios"

SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
integration_test: 5ed24a436eb7ec17b6a13046e9bf7ca4a404e59e
Purchases: d8a798c9c7552fe66b550bf314a143e94ffa70c8
purchases_flutter: 27f87080055c0fd2cd124c247b10cae75b46e7e1
PurchasesCoreSwift: ea4eabae180416e580ac60366f41aa1fefec0693
PurchasesHybridCommon: d9bfb34309db4c9ba82a6f7f3a6275c13befdca7
Purchases: 520fdb59140fed96932a30d02a3ec04858cb541c
purchases_flutter: 05472ba84c83f05a138a3a657f1013f5f7143539
PurchasesCoreSwift: 31c2a3d7394432abbe64d46f0933835de0b33033
PurchasesHybridCommon: 013c8072b73e752a206779747e88c068fbf999ec

PODFILE CHECKSUM: a75497545d4391e2d394c3668e20cfb1c2bbd4aa

COCOAPODS: 1.10.0
COCOAPODS: 1.10.1
2 changes: 0 additions & 2 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../Flutter/Flutter.framework",
"${BUILT_PRODUCTS_DIR}/Purchases/Purchases.framework",
"${BUILT_PRODUCTS_DIR}/PurchasesCoreSwift/PurchasesCoreSwift.framework",
"${BUILT_PRODUCTS_DIR}/PurchasesHybridCommon/PurchasesHybridCommon.framework",
Expand All @@ -253,7 +252,6 @@
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Purchases.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PurchasesCoreSwift.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PurchasesHybridCommon.framework",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ class _PurchaseButton extends StatelessWidget {
print("User cancelled");
} else if (errorCode == PurchasesErrorCode.purchaseNotAllowedError) {
print("User not allowed to purchase");
} else if (errorCode == PurchasesErrorCode.paymentPendingError) {
print("Payment is pending");
}
}
return InitialScreen();
Expand Down
11 changes: 10 additions & 1 deletion ios/Classes/PurchasesFlutterPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ - (void)handleMethodCall:(FlutterMethodCall *)call
[self createAlias:arguments[@"newAppUserID"] result:result];
} else if ([@"setDebugLogsEnabled" isEqualToString:call.method]) {
[self setDebugLogsEnabled:[arguments[@"enabled"] boolValue] result:result];
} else if ([@"setSimulatesAskToBuyInSandbox" isEqualToString:call.method]) {
[self setSimulatesAskToBuyInSandbox:[arguments[@"enabled"] boolValue] result:result];
} else if ([@"setProxyURLString" isEqualToString:call.method]) {
[self setProxyURLString:arguments[@"proxyURLString"] result:result];
} else if ([@"getPurchaserInfo" isEqualToString:call.method]) {
Expand Down Expand Up @@ -283,6 +285,13 @@ - (void)setProxyURLString:(nullable NSString *)proxyURLString
result(nil);
}

- (void)setSimulatesAskToBuyInSandbox:(BOOL)enabled
result:(FlutterResult)result
{
[RCCommonFunctionality setSimulatesAskToBuyInSandbox:enabled];
result(nil);
}

- (void)getPurchaserInfoWithResult:(FlutterResult)result
{
[RCCommonFunctionality getPurchaserInfoWithCompletionBlock:[self getResponseCompletionBlock:result]];
Expand Down Expand Up @@ -483,7 +492,7 @@ - (NSString *)platformFlavor {
}

- (NSString *)platformFlavorVersion {
return @"3.0.2";
return @"3.1.0";
}

@end
4 changes: 2 additions & 2 deletions 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.0.2'
s.version = '3.1.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 All @@ -15,7 +15,7 @@ Pod::Spec.new do |s|
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.dependency 'PurchasesHybridCommon', '1.5.0'
s.dependency 'PurchasesHybridCommon', '1.6.1'
s.ios.deployment_target = '9.0'
s.swift_version = '5.0'

Expand Down
9 changes: 9 additions & 0 deletions lib/purchases_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,15 @@ class Purchases {
.invokeMethod('setDebugLogsEnabled', {'enabled': enabled});
}

///
/// iOS only. Set this property to true *only* when testing the ask-to-buy / SCA purchases flow.
/// More information: http://errors.rev.cat/ask-to-buy
///
static Future<void> setSimulatesAskToBuyInSandbox(bool enabled) async {
return await _channel
.invokeMethod('setSimulatesAskToBuyInSandbox', {'enabled': enabled});
}

///
/// Set this property to your proxy URL before configuring Purchases *only* if you've received a proxy key value from your RevenueCat contact.
///
Expand Down
4 changes: 2 additions & 2 deletions 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.0.2'
s.version = '3.1.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 All @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'FlutterMacOS'
s.dependency 'PurchasesHybridCommon', '1.5.0'
s.dependency 'PurchasesHybridCommon', '1.6.1'
s.platform = :osx, '10.12'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
s.swift_version = '5.0'
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: purchases_flutter
description: A Flutter plugin that makes it simple to build in-app purchases and subscriptions – receipt validation, status tracking, and more. Supports iOS and Android.
version: 3.0.2
version: 3.1.0
homepage: https://www.revenuecat.com/
repository: https://github.com/RevenueCat/purchases-flutter
issue_tracker: https://github.com/RevenueCat/purchases-flutter/issues
Expand Down

0 comments on commit 982ba8e

Please sign in to comment.