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

Commit c940b70

Browse files
authored
[url_launcher] Bump minimum Flutter version and iOS deployment target (#4359)
1 parent 1e92448 commit c940b70

File tree

8 files changed

+17
-32
lines changed

8 files changed

+17
-32
lines changed

packages/url_launcher/url_launcher/CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## NEXT
1+
## 6.0.11
22

3+
* Update minimum Flutter SDK to 2.5 and iOS deployment target to 9.0.
34
* Updated Android lint settings.
45

56
## 6.0.10

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
<string>arm64</string>
2626
</array>
2727
<key>MinimumOSVersion</key>
28-
<string>8.0</string>
28+
<string>9.0</string>
2929
</dict>
3030
</plist>

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@
517517
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
518518
GCC_WARN_UNUSED_FUNCTION = YES;
519519
GCC_WARN_UNUSED_VARIABLE = YES;
520-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
520+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
521521
MTL_ENABLE_DEBUG_INFO = YES;
522522
ONLY_ACTIVE_ARCH = YES;
523523
SDKROOT = iphoneos;
@@ -567,7 +567,7 @@
567567
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
568568
GCC_WARN_UNUSED_FUNCTION = YES;
569569
GCC_WARN_UNUSED_VARIABLE = YES;
570-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
570+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
571571
MTL_ENABLE_DEBUG_INFO = NO;
572572
SDKROOT = iphoneos;
573573
TARGETED_DEVICE_FAMILY = "1,2";

packages/url_launcher/url_launcher/example/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: Demonstrates how to use the url_launcher plugin.
33
publish_to: none
44

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

99
dependencies:
1010
flutter:

packages/url_launcher/url_launcher/ios/Classes/FLTURLLauncherPlugin.m

+4-17
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ - (instancetype)initWithUrl:url withFlutterResult:result {
2323
if (self) {
2424
self.url = url;
2525
self.flutterResult = result;
26-
if (@available(iOS 9.0, *)) {
27-
self.safari = [[SFSafariViewController alloc] initWithURL:url];
28-
self.safari.delegate = self;
29-
}
26+
self.safari = [[SFSafariViewController alloc] initWithURL:url];
27+
self.safari.delegate = self;
3028
}
3129
return self;
3230
}
@@ -78,23 +76,12 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result
7876
} else if ([@"launch" isEqualToString:call.method]) {
7977
NSNumber *useSafariVC = call.arguments[@"useSafariVC"];
8078
if (useSafariVC.boolValue) {
81-
if (@available(iOS 9.0, *)) {
82-
[self launchURLInVC:url result:result];
83-
} else {
84-
[self launchURL:url call:call result:result];
85-
}
79+
[self launchURLInVC:url result:result];
8680
} else {
8781
[self launchURL:url call:call result:result];
8882
}
8983
} else if ([@"closeWebView" isEqualToString:call.method]) {
90-
if (@available(iOS 9.0, *)) {
91-
[self closeWebViewWithResult:result];
92-
} else {
93-
result([FlutterError
94-
errorWithCode:@"API_NOT_AVAILABLE"
95-
message:@"SafariViewController related api is not availabe for version <= IOS9"
96-
details:nil]);
97-
}
84+
[self closeWebViewWithResult:result];
9885
} else {
9986
result(FlutterMethodNotImplemented);
10087
}

packages/url_launcher/url_launcher/ios/url_launcher.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ A Flutter plugin for making the underlying platform (Android or iOS) launch a UR
1717
s.public_header_files = 'Classes/**/*.h'
1818
s.dependency 'Flutter'
1919

20-
s.platform = :ios, '8.0'
21-
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
20+
s.platform = :ios, '9.0'
21+
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
2222
end
2323

packages/url_launcher/url_launcher/lib/url_launcher.dart

+1-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import 'package:url_launcher_platform_interface/url_launcher_platform_interface.
1616
/// schemes which cannot be handled, that is when [canLaunch] would complete
1717
/// with false.
1818
///
19-
/// [forceSafariVC] is only used in iOS with iOS version >= 9.0. By default (when unset), the launcher
19+
/// By default when [forceSafariVC] is unset, the launcher
2020
/// opens web URLs in the Safari View Controller, anything else is opened
2121
/// using the default handler on the platform. If set to true, it opens the
2222
/// URL in the Safari View Controller. If false, the URL is opened in the
@@ -138,9 +138,6 @@ Future<bool> canLaunch(String urlString) async {
138138
/// Or on IOS systems, if [launch] was called without `forceSafariVC` being set to `true`,
139139
/// this call will not do anything either, simply because there is no
140140
/// WebView/SafariViewController available to be closed.
141-
///
142-
/// SafariViewController is only available on IOS version >= 9.0, this method does not do anything
143-
/// on IOS version below 9.0
144141
Future<void> closeWebView() async {
145142
return await UrlLauncherPlatform.instance.closeWebView();
146143
}

packages/url_launcher/url_launcher/pubspec.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ description: Flutter plugin for launching a URL. Supports
33
web, phone, SMS, and email schemes.
44
repository: https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher
55
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
6-
version: 6.0.10
6+
version: 6.0.11
77

88
environment:
9-
sdk: ">=2.12.0 <3.0.0"
10-
flutter: ">=2.0.0"
9+
sdk: ">=2.14.0 <3.0.0"
10+
flutter: ">=2.5.0"
1111

1212
flutter:
1313
plugin:

0 commit comments

Comments
 (0)