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

[in_app_purchase] Update minimum Flutter version to 3.3 and iOS 11 #6873

Merged
merged 4 commits into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/in_app_purchase/in_app_purchase/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.1.4

* Updates iOS minimum version in README.

## 3.1.3

* Ignores a lint in the example app for backwards compatibility.
Expand Down
6 changes: 3 additions & 3 deletions packages/in_app_purchase/in_app_purchase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ A storefront-independent API for purchases in Flutter apps.
This plugin supports in-app purchases (_IAP_) through an _underlying store_,
which can be the App Store (on iOS and macOS) or Google Play (on Android).

| | Android | iOS | macOS |
|-------------|---------|------|--------|
| **Support** | SDK 16+ | 9.0+ | 10.15+ |
| | Android | iOS | macOS |
|-------------|---------|-------|--------|
| **Support** | SDK 16+ | 11.0+ | 10.15+ |

<p>
<img src="https://github.com/flutter/plugins/blob/main/packages/in_app_purchase/in_app_purchase/doc/iap_ios.gif?raw=true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>11.0</string>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in packages/in_app_purchase/in_app_purchase/example/ and the Xcode project files/Podfile were automatically applied by the Flutter tool.

</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -176,7 +176,7 @@
isa = PBXProject;
attributes = {
DefaultBuildSystemTypeForWorkspace = Original;
LastUpgradeCheck = 1100;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "The Flutter Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -224,10 +224,12 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand Down Expand Up @@ -256,6 +258,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -351,7 +354,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -401,7 +404,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion packages/in_app_purchase/in_app_purchase/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: in_app_purchase
description: A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the App Store and Google Play.
repository: https://github.com/flutter/plugins/tree/main/packages/in_app_purchase/in_app_purchase
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
version: 3.1.3
version: 3.1.4

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.6

* Updates minimum Flutter version to 3.3 and iOS 11.

## 0.3.5+2

* Fix a crash when `appStoreReceiptURL` is nil.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Downloaded by pub (not CocoaPods).
s.public_header_files = 'Classes/**/*.h'
s.ios.dependency 'Flutter'
s.osx.dependency 'FlutterMacOS'
s.ios.deployment_target = '9.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.15'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -318,10 +318,12 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand Down Expand Up @@ -354,6 +356,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -493,7 +496,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -543,7 +546,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,10 @@ - (void)testErrorWithUnsupportedUserInfo {
}

- (void)testLocaleToMap {
if (@available(iOS 10.0, *)) {
NSLocale *system = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
NSDictionary *map = [FIAObjectTranslator getMapFromNSLocale:system];
XCTAssertEqualObjects(map[@"currencySymbol"], system.currencySymbol);
XCTAssertEqualObjects(map[@"countryCode"], system.countryCode);
}
NSLocale *system = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
NSDictionary *map = [FIAObjectTranslator getMapFromNSLocale:system];
XCTAssertEqualObjects(map[@"currencySymbol"], system.currencySymbol);
XCTAssertEqualObjects(map[@"countryCode"], system.countryCode);
Comment on lines +227 to +230
Copy link
Member Author

@jmagman jmagman Dec 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I edited this manually, removing the @available check.

}

- (void)testSKStorefrontToMap {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,15 @@ class AppStoreProductDetails extends ProductDetails {
/// Creates a new AppStore specific product details object with the provided
/// details.
AppStoreProductDetails({
required String id,
required String title,
required String description,
required String price,
required double rawPrice,
required String currencyCode,
required super.id,
required super.title,
required super.description,
required super.price,
required super.rawPrice,
required super.currencyCode,
required this.skProduct,
required String currencySymbol,
}) : super(
id: id,
title: title,
description: description,
price: price,
rawPrice: rawPrice,
currencyCode: currencyCode,
currencySymbol: currencySymbol,
);
required super.currencySymbol,
});

/// Generate a [AppStoreProductDetails] object based on an iOS [SKProductWrapper] object.
factory AppStoreProductDetails.fromSKProduct(SKProductWrapper product) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,14 @@ import '../store_kit_wrappers/enum_converters.dart';
class AppStorePurchaseDetails extends PurchaseDetails {
/// Creates a new AppStore specific purchase details object with the provided
/// details.
AppStorePurchaseDetails(
{String? purchaseID,
required String productID,
required PurchaseVerificationData verificationData,
required String? transactionDate,
required this.skPaymentTransaction,
required PurchaseStatus status})
: super(
productID: productID,
purchaseID: purchaseID,
transactionDate: transactionDate,
verificationData: verificationData,
status: status) {
AppStorePurchaseDetails({
super.purchaseID,
required super.productID,
required super.verificationData,
required super.transactionDate,
required this.skPaymentTransaction,
required PurchaseStatus status,
}) : super(status: status) {
this.status = status;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ import '../../store_kit_wrappers.dart';
class AppStorePurchaseParam extends PurchaseParam {
/// Creates a new [AppStorePurchaseParam] object with the given data.
AppStorePurchaseParam({
required ProductDetails productDetails,
String? applicationUserName,
required super.productDetails,
super.applicationUserName,
this.quantity = 1,
this.simulatesAskToBuyInSandbox = false,
this.discount,
}) : super(
productDetails: productDetails,
applicationUserName: applicationUserName,
);
});

/// Set it to `true` to produce an "ask to buy" flow for this payment in the
/// sandbox.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: in_app_purchase_storekit
description: An implementation for the iOS and macOS platforms of the Flutter `in_app_purchase` plugin. This uses the StoreKit Framework.
repository: https://github.com/flutter/plugins/tree/main/packages/in_app_purchase/in_app_purchase_storekit
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
version: 0.3.5+2
version: 0.3.6

environment:
sdk: ">=2.14.0 <3.0.0"
flutter: ">=3.0.0"
sdk: '>=2.18.0 <3.0.0'
flutter: ">=3.3.0"

flutter:
plugin:
Expand Down