Skip to content

Commit

Permalink
[AUTOMATIC BUMP] Updates purchases-hybrid-common to 11.0.0 (#1106)
Browse files Browse the repository at this point in the history
**This is an automatic bump.**

Updates purchases-hybrid-common to 11.0.0

---------

Co-authored-by: Cesar de la Vega <[email protected]>
  • Loading branch information
RCGitBot and vegaro authored Jul 1, 2024
1 parent 8831543 commit e722a44
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 14 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version '6.29.4'

buildscript {
ext.kotlin_version = '1.7.21'
ext.common_version = '10.9.0'
ext.common_version = '11.0.0'
repositories {
google()
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.OptIn;

import com.revenuecat.purchases.DangerousSettings;
import com.revenuecat.purchases.Purchases;
import com.revenuecat.purchases.PurchasesAreCompletedBy;
import com.revenuecat.purchases.PurchasesErrorCode;
import com.revenuecat.purchases.Store;
import com.revenuecat.purchases.common.PlatformInfo;
Expand All @@ -31,7 +31,6 @@
import java.util.List;
import java.util.Map;

import io.flutter.embedding.android.FlutterFragmentActivity;
import io.flutter.embedding.engine.plugins.FlutterPlugin;
import io.flutter.embedding.engine.plugins.activity.ActivityAware;
import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding;
Expand Down Expand Up @@ -385,9 +384,20 @@ private void setupPurchases(String apiKey, String appUserID, @Nullable Boolean o
if (useAmazon != null && useAmazon) {
store = Store.AMAZON;
}
CommonKt.configure(this.applicationContext, apiKey, appUserID, observerMode,
platformInfo, store, new DangerousSettings(),
shouldShowInAppMessagesAutomatically, verificationMode);
PurchasesAreCompletedBy purchasesAreCompletedBy = null;
if (observerMode != null) {
purchasesAreCompletedBy = observerMode ?
PurchasesAreCompletedBy.MY_APP : PurchasesAreCompletedBy.REVENUECAT;
}
CommonKt.configure(this.applicationContext,
apiKey,
appUserID,
purchasesAreCompletedBy,
platformInfo,
store,
new DangerousSettings(),
shouldShowInAppMessagesAutomatically,
verificationMode);
setUpdatedCustomerInfoListener();
result.success(null);
} else {
Expand All @@ -407,7 +417,8 @@ private void setUpdatedCustomerInfoListener() {

private void setFinishTransactions(@Nullable Boolean finishTransactions, Result result) {
if (finishTransactions != null) {
CommonKt.setFinishTransactions(finishTransactions);
CommonKt.setPurchasesAreCompletedBy(finishTransactions ?
PurchasesAreCompletedBy.REVENUECAT : PurchasesAreCompletedBy.MY_APP);
result.success(null);
} else {
result.error(
Expand Down
8 changes: 6 additions & 2 deletions ios/Classes/PurchasesFlutterPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ - (void)setupPurchases:(NSString *)apiKey

RCPurchases *purchases = [RCPurchases configureWithAPIKey:apiKey
appUserID:appUserID
observerMode:observerMode
purchasesAreCompletedBy:(observerMode ? RCPurchasesAreCompletedByMyApp : RCPurchasesAreCompletedByRevenueCat)
userDefaultsSuiteName:userDefaultsSuiteName
platformFlavor:self.platformFlavor
platformFlavorVersion:self.platformFlavorVersion
Expand All @@ -271,7 +271,11 @@ - (void)setAllowSharingStoreAccount:(BOOL)allowSharingStoreAccount

- (void)setFinishTransactions:(BOOL)finishTransactions
result:(FlutterResult)result {
[RCCommonFunctionality setFinishTransactions:finishTransactions];
if (finishTransactions) {
[RCCommonFunctionality setPurchasesAreCompletedBy:RCPurchasesAreCompletedByRevenueCat];
} else {
[RCCommonFunctionality setPurchasesAreCompletedBy:RCPurchasesAreCompletedByMyApp];
}
result(nil);
}

Expand Down
2 changes: 1 addition & 1 deletion ios/purchases_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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', '10.9.0'
s.dependency 'PurchasesHybridCommon', '11.0.0'
s.ios.deployment_target = '11.0'
s.swift_version = '5.0'

Expand Down
2 changes: 1 addition & 1 deletion macos/purchases_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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', '10.9.0'
s.dependency 'PurchasesHybridCommon', '11.0.0'
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 purchases_ui_flutter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version '6.29.4'

buildscript {
ext.kotlin_version = '1.9.20'
ext.common_version = '10.9.0'
ext.common_version = '11.0.0'
repositories {
google()
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion purchases_ui_flutter/ios/purchases_ui_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Flutter plugin that integrates RevenueCat Paywalls
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.dependency 'PurchasesHybridCommonUI', '10.9.0'
s.dependency 'PurchasesHybridCommonUI', '11.0.0'
s.platform = :ios, '11.0'

# Flutter.framework does not contain a i386 slice.
Expand Down
2 changes: 1 addition & 1 deletion purchases_ui_flutter/macos/purchases_ui_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Flutter plugin that integrates RevenueCat Paywalls
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'FlutterMacOS'
s.dependency 'PurchasesHybridCommonUI', '10.9.0'
s.dependency 'PurchasesHybridCommonUI', '11.0.0'

s.platform = :osx, '10.11'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
Expand Down

0 comments on commit e722a44

Please sign in to comment.