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

Commit ea048a2

Browse files
authored
[in_app_purchase] Update minimum Flutter version to 3.3 and iOS 11 (#6873)
* [in_app_purchase] Bump minimum Flutter version to 3.3 for iOS plugins * Bump Flutter version * super params * Format
1 parent 7160f55 commit ea048a2

File tree

19 files changed

+65
-61
lines changed

19 files changed

+65
-61
lines changed

packages/in_app_purchase/in_app_purchase/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.1.4
2+
3+
* Updates iOS minimum version in README.
4+
15
## 3.1.3
26

37
* Ignores a lint in the example app for backwards compatibility.

packages/in_app_purchase/in_app_purchase/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ A storefront-independent API for purchases in Flutter apps.
55
This plugin supports in-app purchases (_IAP_) through an _underlying store_,
66
which can be the App Store (on iOS and macOS) or Google Play (on Android).
77

8-
| | Android | iOS | macOS |
9-
|-------------|---------|------|--------|
10-
| **Support** | SDK 16+ | 9.0+ | 10.15+ |
8+
| | Android | iOS | macOS |
9+
|-------------|---------|-------|--------|
10+
| **Support** | SDK 16+ | 11.0+ | 10.15+ |
1111

1212
<p>
1313
<img src="https://github.com/flutter/plugins/blob/main/packages/in_app_purchase/in_app_purchase/doc/iap_ios.gif?raw=true"

packages/in_app_purchase/in_app_purchase/example/ios/Flutter/AppFrameworkInfo.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>8.0</string>
24+
<string>11.0</string>
2525
</dict>
2626
</plist>

packages/in_app_purchase/in_app_purchase/example/ios/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '9.0'
2+
# platform :ios, '11.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

packages/in_app_purchase/in_app_purchase/example/ios/Runner.xcodeproj/project.pbxproj

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -176,7 +176,7 @@
176176
isa = PBXProject;
177177
attributes = {
178178
DefaultBuildSystemTypeForWorkspace = Original;
179-
LastUpgradeCheck = 1100;
179+
LastUpgradeCheck = 1300;
180180
ORGANIZATIONNAME = "The Flutter Authors";
181181
TargetAttributes = {
182182
97C146ED1CF9000F007C117D = {
@@ -224,10 +224,12 @@
224224
/* Begin PBXShellScriptBuildPhase section */
225225
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
226226
isa = PBXShellScriptBuildPhase;
227+
alwaysOutOfDate = 1;
227228
buildActionMask = 2147483647;
228229
files = (
229230
);
230231
inputPaths = (
232+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
231233
);
232234
name = "Thin Binary";
233235
outputPaths = (
@@ -256,6 +258,7 @@
256258
};
257259
9740EEB61CF901F6004384FC /* Run Script */ = {
258260
isa = PBXShellScriptBuildPhase;
261+
alwaysOutOfDate = 1;
259262
buildActionMask = 2147483647;
260263
files = (
261264
);
@@ -351,7 +354,7 @@
351354
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
352355
GCC_WARN_UNUSED_FUNCTION = YES;
353356
GCC_WARN_UNUSED_VARIABLE = YES;
354-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
357+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
355358
MTL_ENABLE_DEBUG_INFO = YES;
356359
ONLY_ACTIVE_ARCH = YES;
357360
SDKROOT = iphoneos;
@@ -401,7 +404,7 @@
401404
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
402405
GCC_WARN_UNUSED_FUNCTION = YES;
403406
GCC_WARN_UNUSED_VARIABLE = YES;
404-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
407+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
405408
MTL_ENABLE_DEBUG_INFO = NO;
406409
SDKROOT = iphoneos;
407410
TARGETED_DEVICE_FAMILY = "1,2";

packages/in_app_purchase/in_app_purchase/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1100"
3+
LastUpgradeVersion = "1300"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

packages/in_app_purchase/in_app_purchase/example/ios/Runner/Info.plist

+4
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,9 @@
4141
</array>
4242
<key>UIViewControllerBasedStatusBarAppearance</key>
4343
<false/>
44+
<key>CADisableMinimumFrameDurationOnPhone</key>
45+
<true/>
46+
<key>UIApplicationSupportsIndirectInputEvents</key>
47+
<true/>
4448
</dict>
4549
</plist>

packages/in_app_purchase/in_app_purchase/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: in_app_purchase
22
description: A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the App Store and Google Play.
33
repository: https://github.com/flutter/plugins/tree/main/packages/in_app_purchase/in_app_purchase
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
5-
version: 3.1.3
5+
version: 3.1.4
66

77
environment:
88
sdk: ">=2.12.0 <3.0.0"

packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.3.6
2+
3+
* Updates minimum Flutter version to 3.3 and iOS 11.
4+
15
## 0.3.5+2
26

37
* Fix a crash when `appStoreReceiptURL` is nil.

packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Downloaded by pub (not CocoaPods).
2020
s.public_header_files = 'Classes/**/*.h'
2121
s.ios.dependency 'Flutter'
2222
s.osx.dependency 'FlutterMacOS'
23-
s.ios.deployment_target = '9.0'
23+
s.ios.deployment_target = '11.0'
2424
s.osx.deployment_target = '10.15'
2525
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
2626
end

packages/in_app_purchase/in_app_purchase_storekit/example/ios/Flutter/AppFrameworkInfo.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>9.0</string>
24+
<string>11.0</string>
2525
</dict>
2626
</plist>

packages/in_app_purchase/in_app_purchase_storekit/example/ios/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '9.0'
2+
# platform :ios, '11.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

packages/in_app_purchase/in_app_purchase_storekit/example/ios/Runner.xcodeproj/project.pbxproj

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -318,10 +318,12 @@
318318
/* Begin PBXShellScriptBuildPhase section */
319319
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
320320
isa = PBXShellScriptBuildPhase;
321+
alwaysOutOfDate = 1;
321322
buildActionMask = 2147483647;
322323
files = (
323324
);
324325
inputPaths = (
326+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
325327
);
326328
name = "Thin Binary";
327329
outputPaths = (
@@ -354,6 +356,7 @@
354356
};
355357
9740EEB61CF901F6004384FC /* Run Script */ = {
356358
isa = PBXShellScriptBuildPhase;
359+
alwaysOutOfDate = 1;
357360
buildActionMask = 2147483647;
358361
files = (
359362
);
@@ -493,7 +496,7 @@
493496
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
494497
GCC_WARN_UNUSED_FUNCTION = YES;
495498
GCC_WARN_UNUSED_VARIABLE = YES;
496-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
499+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
497500
MTL_ENABLE_DEBUG_INFO = YES;
498501
ONLY_ACTIVE_ARCH = YES;
499502
SDKROOT = iphoneos;
@@ -543,7 +546,7 @@
543546
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
544547
GCC_WARN_UNUSED_FUNCTION = YES;
545548
GCC_WARN_UNUSED_VARIABLE = YES;
546-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
549+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
547550
MTL_ENABLE_DEBUG_INFO = NO;
548551
SDKROOT = iphoneos;
549552
TARGETED_DEVICE_FAMILY = "1,2";

packages/in_app_purchase/in_app_purchase_storekit/example/ios/Runner/Info.plist

+4
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,9 @@
4141
</array>
4242
<key>UIViewControllerBasedStatusBarAppearance</key>
4343
<false/>
44+
<key>CADisableMinimumFrameDurationOnPhone</key>
45+
<true/>
46+
<key>UIApplicationSupportsIndirectInputEvents</key>
47+
<true/>
4448
</dict>
4549
</plist>

packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/TranslatorTests.m

+4-6
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,10 @@ - (void)testErrorWithUnsupportedUserInfo {
224224
}
225225

226226
- (void)testLocaleToMap {
227-
if (@available(iOS 10.0, *)) {
228-
NSLocale *system = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
229-
NSDictionary *map = [FIAObjectTranslator getMapFromNSLocale:system];
230-
XCTAssertEqualObjects(map[@"currencySymbol"], system.currencySymbol);
231-
XCTAssertEqualObjects(map[@"countryCode"], system.countryCode);
232-
}
227+
NSLocale *system = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
228+
NSDictionary *map = [FIAObjectTranslator getMapFromNSLocale:system];
229+
XCTAssertEqualObjects(map[@"currencySymbol"], system.currencySymbol);
230+
XCTAssertEqualObjects(map[@"countryCode"], system.countryCode);
233231
}
234232

235233
- (void)testSKStorefrontToMap {

packages/in_app_purchase/in_app_purchase_storekit/lib/src/types/app_store_product_details.dart

+8-16
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,15 @@ class AppStoreProductDetails extends ProductDetails {
1212
/// Creates a new AppStore specific product details object with the provided
1313
/// details.
1414
AppStoreProductDetails({
15-
required String id,
16-
required String title,
17-
required String description,
18-
required String price,
19-
required double rawPrice,
20-
required String currencyCode,
15+
required super.id,
16+
required super.title,
17+
required super.description,
18+
required super.price,
19+
required super.rawPrice,
20+
required super.currencyCode,
2121
required this.skProduct,
22-
required String currencySymbol,
23-
}) : super(
24-
id: id,
25-
title: title,
26-
description: description,
27-
price: price,
28-
rawPrice: rawPrice,
29-
currencyCode: currencyCode,
30-
currencySymbol: currencySymbol,
31-
);
22+
required super.currencySymbol,
23+
});
3224

3325
/// Generate a [AppStoreProductDetails] object based on an iOS [SKProductWrapper] object.
3426
factory AppStoreProductDetails.fromSKProduct(SKProductWrapper product) {

packages/in_app_purchase/in_app_purchase_storekit/lib/src/types/app_store_purchase_details.dart

+8-13
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,14 @@ import '../store_kit_wrappers/enum_converters.dart';
1313
class AppStorePurchaseDetails extends PurchaseDetails {
1414
/// Creates a new AppStore specific purchase details object with the provided
1515
/// details.
16-
AppStorePurchaseDetails(
17-
{String? purchaseID,
18-
required String productID,
19-
required PurchaseVerificationData verificationData,
20-
required String? transactionDate,
21-
required this.skPaymentTransaction,
22-
required PurchaseStatus status})
23-
: super(
24-
productID: productID,
25-
purchaseID: purchaseID,
26-
transactionDate: transactionDate,
27-
verificationData: verificationData,
28-
status: status) {
16+
AppStorePurchaseDetails({
17+
super.purchaseID,
18+
required super.productID,
19+
required super.verificationData,
20+
required super.transactionDate,
21+
required this.skPaymentTransaction,
22+
required PurchaseStatus status,
23+
}) : super(status: status) {
2924
this.status = status;
3025
}
3126

packages/in_app_purchase/in_app_purchase_storekit/lib/src/types/app_store_purchase_param.dart

+3-6
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@ import '../../store_kit_wrappers.dart';
1010
class AppStorePurchaseParam extends PurchaseParam {
1111
/// Creates a new [AppStorePurchaseParam] object with the given data.
1212
AppStorePurchaseParam({
13-
required ProductDetails productDetails,
14-
String? applicationUserName,
13+
required super.productDetails,
14+
super.applicationUserName,
1515
this.quantity = 1,
1616
this.simulatesAskToBuyInSandbox = false,
1717
this.discount,
18-
}) : super(
19-
productDetails: productDetails,
20-
applicationUserName: applicationUserName,
21-
);
18+
});
2219

2320
/// Set it to `true` to produce an "ask to buy" flow for this payment in the
2421
/// sandbox.

packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: in_app_purchase_storekit
22
description: An implementation for the iOS and macOS platforms of the Flutter `in_app_purchase` plugin. This uses the StoreKit Framework.
33
repository: https://github.com/flutter/plugins/tree/main/packages/in_app_purchase/in_app_purchase_storekit
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
5-
version: 0.3.5+2
5+
version: 0.3.6
66

77
environment:
8-
sdk: ">=2.14.0 <3.0.0"
9-
flutter: ">=3.0.0"
8+
sdk: '>=2.18.0 <3.0.0'
9+
flutter: ">=3.3.0"
1010

1111
flutter:
1212
plugin:

0 commit comments

Comments
 (0)