Skip to content

Commit

Permalink
refine StoreKitVersion logging in configure function
Browse files Browse the repository at this point in the history
  • Loading branch information
fire-at-will authored Aug 19, 2024
1 parent 7458c60 commit 525707b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/purchases_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,21 @@ class Purchases {
as PurchasesAreCompletedByMyApp)
.storeKitVersion;

if (storeKitVersionToUse != purchasesConfiguration.storeKitVersion) {
if (purchasesConfiguration.storeKitVersion != null &&
purchasesConfiguration.storeKitVersion !=
StoreKitVersion.defaultVersion &&
storeKitVersionToUse != purchasesConfiguration.storeKitVersion) {
debugPrint(
'Warning: The storeKitVersion in purchasesAreCompletedBy does not match the '
'function\'s storeKitVersion parameter. We will use the value found in purchasesAreCompletedBy.');
}

if (storeKitVersionToUse == StoreKitVersion.defaultVersion) {
debugPrint(
'Warning: You should provide the specific StoreKit version you\'re using in '
'your implementation when configuring PurchasesAreCompletedByMyApp, '
'and not rely on the DEFAULT.');
}
}

await _channel.invokeMethod(
Expand Down

0 comments on commit 525707b

Please sign in to comment.