Skip to content

Commit f9ec026

Browse files
authored
[in_app_purchase] Bump minimum Flutter version and iOS deployment target (flutter#4352)
1 parent b312402 commit f9ec026

File tree

10 files changed

+22
-28
lines changed

10 files changed

+22
-28
lines changed

packages/in_app_purchase/in_app_purchase_ios/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.3+4
2+
3+
* Update minimum Flutter SDK to 2.5 and iOS deployment target to 9.0.
4+
15
## 0.1.3+3
26

37
* Add `implements` to pubspec.

packages/in_app_purchase/in_app_purchase_ios/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ If you would like to contribute to the plugin, check out our
2424
[contribution guide](https://github.com/flutter/plugins/blob/master/CONTRIBUTING.md).
2525

2626

27-
[1]: ../in_app_purchase/in_app_purchase
27+
[1]: ../in_app_purchase
2828
[2]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin
2929
[3]: https://pub.dev/packages/in_app_purchase_ios/install

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

Lines changed: 1 addition & 1 deletion
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>9.0</string>
2525
</dict>
2626
</plist>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@
489489
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
490490
GCC_WARN_UNUSED_FUNCTION = YES;
491491
GCC_WARN_UNUSED_VARIABLE = YES;
492-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
492+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
493493
MTL_ENABLE_DEBUG_INFO = YES;
494494
ONLY_ACTIVE_ARCH = YES;
495495
SDKROOT = iphoneos;
@@ -539,7 +539,7 @@
539539
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
540540
GCC_WARN_UNUSED_FUNCTION = YES;
541541
GCC_WARN_UNUSED_VARIABLE = YES;
542-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
542+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
543543
MTL_ENABLE_DEBUG_INFO = NO;
544544
SDKROOT = iphoneos;
545545
TARGETED_DEVICE_FAMILY = "1,2";

packages/in_app_purchase/in_app_purchase_ios/example/ios/RunnerTests/InAppPurchasePluginTests.m

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,7 @@ - (void)testAddPaymentWithNullSandboxArgument {
169169
transactionForUpdateBlock = transaction;
170170
[expectation fulfill];
171171
}
172-
if (@available(iOS 8.3, *)) {
173-
if (!transaction.payment.simulatesAskToBuyInSandbox) {
174-
[simulatesAskToBuyInSandboxExpectation fulfill];
175-
}
176-
} else {
172+
if (!transaction.payment.simulatesAskToBuyInSandbox) {
177173
[simulatesAskToBuyInSandboxExpectation fulfill];
178174
}
179175
}

packages/in_app_purchase/in_app_purchase_ios/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: Demonstrates how to use the in_app_purchase_ios plugin.
33
publish_to: none
44

55
environment:
6-
sdk: ">=2.12.0 <3.0.0"
7-
flutter: ">=1.9.1+hotfix.2"
6+
sdk: ">=2.14.0 <3.0.0"
7+
flutter: ">=2.5.0"
88

99
dependencies:
1010
flutter:

packages/in_app_purchase/in_app_purchase_ios/ios/Classes/FIAObjectTranslator.m

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ + (NSDictionary *)getMapFromSKPayment:(SKPayment *)payment {
9696
@"quantity" : @(payment.quantity),
9797
@"applicationUsername" : payment.applicationUsername ?: [NSNull null]
9898
}];
99-
if (@available(iOS 8.3, *)) {
100-
[map setObject:@(payment.simulatesAskToBuyInSandbox) forKey:@"simulatesAskToBuyInSandbox"];
101-
}
99+
[map setObject:@(payment.simulatesAskToBuyInSandbox) forKey:@"simulatesAskToBuyInSandbox"];
102100
return map;
103101
}
104102

@@ -125,9 +123,7 @@ + (SKMutablePayment *)getSKMutablePaymentFromMap:(NSDictionary *)map {
125123
payment.requestData = [utf8String dataUsingEncoding:NSUTF8StringEncoding];
126124
payment.quantity = [map[@"quantity"] integerValue];
127125
payment.applicationUsername = map[@"applicationUsername"];
128-
if (@available(iOS 8.3, *)) {
129-
payment.simulatesAskToBuyInSandbox = [map[@"simulatesAskToBuyInSandbox"] boolValue];
130-
}
126+
payment.simulatesAskToBuyInSandbox = [map[@"simulatesAskToBuyInSandbox"] boolValue];
131127
return payment;
132128
}
133129

packages/in_app_purchase/in_app_purchase_ios/ios/Classes/InAppPurchasePlugin.m

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,10 @@ - (void)addPayment:(FlutterMethodCall *)call result:(FlutterResult)result {
198198
payment.applicationUsername = [paymentMap objectForKey:@"applicationUsername"];
199199
NSNumber *quantity = [paymentMap objectForKey:@"quantity"];
200200
payment.quantity = (quantity != nil) ? quantity.integerValue : 1;
201-
if (@available(iOS 8.3, *)) {
202-
NSNumber *simulatesAskToBuyInSandbox = [paymentMap objectForKey:@"simulatesAskToBuyInSandbox"];
203-
payment.simulatesAskToBuyInSandbox = (id)simulatesAskToBuyInSandbox == (id)[NSNull null]
204-
? NO
205-
: [simulatesAskToBuyInSandbox boolValue];
206-
}
201+
NSNumber *simulatesAskToBuyInSandbox = [paymentMap objectForKey:@"simulatesAskToBuyInSandbox"];
202+
payment.simulatesAskToBuyInSandbox = (id)simulatesAskToBuyInSandbox == (id)[NSNull null]
203+
? NO
204+
: [simulatesAskToBuyInSandbox boolValue];
207205

208206
if (![self.paymentQueueHandler addPayment:payment]) {
209207
result([FlutterError

packages/in_app_purchase/in_app_purchase_ios/ios/in_app_purchase_ios.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ Downloaded by pub (not CocoaPods).
1919
s.source_files = 'Classes/**/*'
2020
s.public_header_files = 'Classes/**/*.h'
2121
s.dependency 'Flutter'
22-
s.platform = :ios, '8.0'
23-
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS' => 'armv7 arm64 x86_64' }
22+
s.platform = :ios, '9.0'
23+
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
2424
end

packages/in_app_purchase/in_app_purchase_ios/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: in_app_purchase_ios
22
description: An implementation for the iOS platform of the Flutter `in_app_purchase` plugin. This uses the iOS StoreKit Framework.
33
repository: https://github.com/flutter/plugins/tree/master/packages/in_app_purchase/in_app_purchase_ios
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.1.3+3
5+
version: 0.1.3+4
66

77
environment:
8-
sdk: ">=2.12.0 <3.0.0"
9-
flutter: ">=2.0.0"
8+
sdk: ">=2.14.0 <3.0.0"
9+
flutter: ">=2.5.0"
1010

1111
flutter:
1212
plugin:

0 commit comments

Comments
 (0)