Skip to content

Commit b67b223

Browse files
jmagmannploi
authored andcommitted
[webview_flutter] Update minimum Flutter version to 3.3 and iOS 11 (flutter#3336)
1 parent 6681644 commit b67b223

File tree

20 files changed

+89
-114
lines changed

20 files changed

+89
-114
lines changed

packages/webview_flutter/webview_flutter/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.0.6
2+
3+
* Updates iOS minimum version in README.
4+
15
## 4.0.5
26

37
* Updates links for the merge of flutter/plugins into flutter/packages.

packages/webview_flutter/webview_flutter/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ A Flutter plugin that provides a WebView widget.
99
On iOS the WebView widget is backed by a [WKWebView](https://developer.apple.com/documentation/webkit/wkwebview).
1010
On Android the WebView widget is backed by a [WebView](https://developer.android.com/reference/android/webkit/WebView).
1111

12-
| | Android | iOS |
13-
|-------------|----------------|------|
14-
| **Support** | SDK 19+ or 20+ | 9.0+ |
12+
| | Android | iOS |
13+
|-------------|----------------|-------|
14+
| **Support** | SDK 19+ or 20+ | 11.0+ |
1515

1616
## Usage
1717
Add `webview_flutter` as a [dependency in your pubspec.yaml file](https://pub.dev/packages/webview_flutter/install).

packages/webview_flutter/webview_flutter/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>9.0</string>
24+
<string>11.0</string>
2525
</dict>
2626
</plist>

packages/webview_flutter/webview_flutter/example/ios/Podfile

Lines changed: 1 addition & 1 deletion
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/webview_flutter/webview_flutter/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 7 additions & 4 deletions
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 */
@@ -274,7 +274,7 @@
274274
isa = PBXProject;
275275
attributes = {
276276
DefaultBuildSystemTypeForWorkspace = Original;
277-
LastUpgradeCheck = 1030;
277+
LastUpgradeCheck = 1300;
278278
ORGANIZATIONNAME = "The Flutter Authors";
279279
TargetAttributes = {
280280
68BDCAE823C3F7CB00D9C032 = {
@@ -363,10 +363,12 @@
363363
};
364364
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
365365
isa = PBXShellScriptBuildPhase;
366+
alwaysOutOfDate = 1;
366367
buildActionMask = 2147483647;
367368
files = (
368369
);
369370
inputPaths = (
371+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
370372
);
371373
name = "Thin Binary";
372374
outputPaths = (
@@ -377,6 +379,7 @@
377379
};
378380
9740EEB61CF901F6004384FC /* Run Script */ = {
379381
isa = PBXShellScriptBuildPhase;
382+
alwaysOutOfDate = 1;
380383
buildActionMask = 2147483647;
381384
files = (
382385
);
@@ -552,7 +555,7 @@
552555
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
553556
GCC_WARN_UNUSED_FUNCTION = YES;
554557
GCC_WARN_UNUSED_VARIABLE = YES;
555-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
558+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
556559
MTL_ENABLE_DEBUG_INFO = YES;
557560
ONLY_ACTIVE_ARCH = YES;
558561
SDKROOT = iphoneos;
@@ -602,7 +605,7 @@
602605
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
603606
GCC_WARN_UNUSED_FUNCTION = YES;
604607
GCC_WARN_UNUSED_VARIABLE = YES;
605-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
608+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
606609
MTL_ENABLE_DEBUG_INFO = NO;
607610
SDKROOT = iphoneos;
608611
TARGETED_DEVICE_FAMILY = "1,2";

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

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

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

Lines changed: 4 additions & 0 deletions
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/webview_flutter/webview_flutter/example/ios/RunnerTests/FLTWebViewTests.m

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,17 @@ - (void)testCanInitFLTWebViewFactory {
3939
XCTAssertNotNil(factory);
4040
}
4141

42-
- (void)webViewContentInsetBehaviorShouldBeNeverOnIOS11 {
43-
if (@available(iOS 11, *)) {
44-
FLTWebViewController *controller =
45-
[[FLTWebViewController alloc] initWithFrame:CGRectMake(0, 0, 300, 400)
46-
viewIdentifier:1
47-
arguments:nil
48-
binaryMessenger:self.mockBinaryMessenger];
49-
UIView *view = controller.view;
50-
XCTAssertTrue([view isKindOfClass:WKWebView.class]);
51-
WKWebView *webView = (WKWebView *)view;
52-
XCTAssertEqual(webView.scrollView.contentInsetAdjustmentBehavior,
53-
UIScrollViewContentInsetAdjustmentNever);
54-
}
42+
- (void)webViewContentInsetBehaviorShouldBeNever {
43+
FLTWebViewController *controller =
44+
[[FLTWebViewController alloc] initWithFrame:CGRectMake(0, 0, 300, 400)
45+
viewIdentifier:1
46+
arguments:nil
47+
binaryMessenger:self.mockBinaryMessenger];
48+
UIView *view = controller.view;
49+
XCTAssertTrue([view isKindOfClass:WKWebView.class]);
50+
WKWebView *webView = (WKWebView *)view;
51+
XCTAssertEqual(webView.scrollView.contentInsetAdjustmentBehavior,
52+
UIScrollViewContentInsetAdjustmentNever);
5553
}
5654

5755
- (void)testWebViewScrollIndicatorAticautomaticallyAdjustsScrollIndicatorInsetsShouldbeNoOnIOS13 {
@@ -76,16 +74,14 @@ - (void)testContentInsetsSumAlwaysZeroAfterSetFrame {
7674
XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(webView.scrollView.contentInset, UIEdgeInsetsZero));
7775
XCTAssertTrue(CGRectEqualToRect(webView.frame, CGRectMake(0, 0, 300, 200)));
7876

79-
if (@available(iOS 11, *)) {
80-
// After iOS 11, we need to make sure the contentInset compensates the adjustedContentInset.
81-
UIScrollView *partialMockScrollView = OCMPartialMock(webView.scrollView);
82-
UIEdgeInsets insetToAdjust = UIEdgeInsetsMake(0, 0, 300, 0);
83-
OCMStub(partialMockScrollView.adjustedContentInset).andReturn(insetToAdjust);
84-
XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(webView.scrollView.contentInset, UIEdgeInsetsZero));
85-
webView.frame = CGRectMake(0, 0, 300, 100);
86-
XCTAssertTrue(feq(webView.scrollView.contentInset.bottom, -insetToAdjust.bottom));
87-
XCTAssertTrue(CGRectEqualToRect(webView.frame, CGRectMake(0, 0, 300, 100)));
88-
}
77+
// Make sure the contentInset compensates the adjustedContentInset.
78+
UIScrollView *partialMockScrollView = OCMPartialMock(webView.scrollView);
79+
UIEdgeInsets insetToAdjust = UIEdgeInsetsMake(0, 0, 300, 0);
80+
OCMStub(partialMockScrollView.adjustedContentInset).andReturn(insetToAdjust);
81+
XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(webView.scrollView.contentInset, UIEdgeInsetsZero));
82+
webView.frame = CGRectMake(0, 0, 300, 100);
83+
XCTAssertTrue(feq(webView.scrollView.contentInset.bottom, -insetToAdjust.bottom));
84+
XCTAssertTrue(CGRectEqualToRect(webView.frame, CGRectMake(0, 0, 300, 100)));
8985
}
9086

9187
@end

packages/webview_flutter/webview_flutter/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: webview_flutter
22
description: A Flutter plugin that provides a WebView widget on Android and iOS.
33
repository: https://github.com/flutter/packages/tree/main/packages/webview_flutter/webview_flutter
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22
5-
version: 4.0.5
5+
version: 4.0.6
66

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

packages/webview_flutter/webview_flutter_wkwebview/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.2.0
2+
3+
* Updates minimum Flutter version to 3.3 and iOS 11.
4+
15
## 3.1.1
26

37
* Updates links for the merge of flutter/plugins into flutter/packages.

packages/webview_flutter/webview_flutter_wkwebview/example/ios/Runner/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,7 @@
4343
<false/>
4444
<key>CADisableMinimumFrameDurationOnPhone</key>
4545
<true/>
46+
<key>UIApplicationSupportsIndirectInputEvents</key>
47+
<true/>
4648
</dict>
4749
</plist>

packages/webview_flutter/webview_flutter_wkwebview/example/ios/RunnerTests/FWFHTTPCookieStoreHostApiTests.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ @interface FWFHTTPCookieStoreHostApiTests : XCTestCase
1212
@end
1313

1414
@implementation FWFHTTPCookieStoreHostApiTests
15-
- (void)testCreateFromWebsiteDataStoreWithIdentifier API_AVAILABLE(ios(11.0)) {
15+
- (void)testCreateFromWebsiteDataStoreWithIdentifier {
1616
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
1717
FWFHTTPCookieStoreHostApiImpl *hostAPI =
1818
[[FWFHTTPCookieStoreHostApiImpl alloc] initWithInstanceManager:instanceManager];
@@ -28,7 +28,7 @@ - (void)testCreateFromWebsiteDataStoreWithIdentifier API_AVAILABLE(ios(11.0)) {
2828
XCTAssertNil(error);
2929
}
3030

31-
- (void)testSetCookie API_AVAILABLE(ios(11.0)) {
31+
- (void)testSetCookie {
3232
WKHTTPCookieStore *mockHttpCookieStore = OCMClassMock([WKHTTPCookieStore class]);
3333

3434
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];

packages/webview_flutter/webview_flutter_wkwebview/example/ios/RunnerTests/FWFWebViewHostApiTests.m

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ - (void)testEvaluateJavaScriptReturnsNSErrorData {
411411
XCTAssertEqualObjects(errorData.localizedDescription, @"description");
412412
}
413413

414-
- (void)testWebViewContentInsetBehaviorShouldBeNeverOnIOS11 API_AVAILABLE(ios(11.0)) {
414+
- (void)testWebViewContentInsetBehaviorShouldBeNever {
415415
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
416416
FWFWebViewHostApiImpl *hostAPI = [[FWFWebViewHostApiImpl alloc]
417417
initWithBinaryMessenger:OCMProtocolMock(@protocol(FlutterBinaryMessenger))
@@ -454,16 +454,14 @@ - (void)testContentInsetsSumAlwaysZeroAfterSetFrame {
454454
XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(webView.scrollView.contentInset, UIEdgeInsetsZero));
455455
XCTAssertTrue(CGRectEqualToRect(webView.frame, CGRectMake(0, 0, 300, 200)));
456456

457-
if (@available(iOS 11, *)) {
458-
// After iOS 11, we need to make sure the contentInset compensates the adjustedContentInset.
459-
UIScrollView *partialMockScrollView = OCMPartialMock(webView.scrollView);
460-
UIEdgeInsets insetToAdjust = UIEdgeInsetsMake(0, 0, 300, 0);
461-
OCMStub(partialMockScrollView.adjustedContentInset).andReturn(insetToAdjust);
462-
XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(webView.scrollView.contentInset, UIEdgeInsetsZero));
463-
464-
webView.frame = CGRectMake(0, 0, 300, 100);
465-
XCTAssertTrue(feq(webView.scrollView.contentInset.bottom, -insetToAdjust.bottom));
466-
XCTAssertTrue(CGRectEqualToRect(webView.frame, CGRectMake(0, 0, 300, 100)));
467-
}
457+
// Make sure the contentInset compensates the adjustedContentInset.
458+
UIScrollView *partialMockScrollView = OCMPartialMock(webView.scrollView);
459+
UIEdgeInsets insetToAdjust = UIEdgeInsetsMake(0, 0, 300, 0);
460+
OCMStub(partialMockScrollView.adjustedContentInset).andReturn(insetToAdjust);
461+
XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(webView.scrollView.contentInset, UIEdgeInsetsZero));
462+
463+
webView.frame = CGRectMake(0, 0, 300, 100);
464+
XCTAssertTrue(feq(webView.scrollView.contentInset.bottom, -insetToAdjust.bottom));
465+
XCTAssertTrue(CGRectEqualToRect(webView.frame, CGRectMake(0, 0, 300, 100)));
468466
}
469467
@end

packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFDataConverters.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ extern WKUserScriptInjectionTime FWFWKUserScriptInjectionTimeFromEnumData(
7272
*
7373
* @return A WKAudiovisualMediaType or -1 if data could not be converted.
7474
*/
75-
API_AVAILABLE(ios(10.0))
7675
extern WKAudiovisualMediaTypes FWFWKAudiovisualMediaTypeFromEnumData(
7776
FWFWKAudiovisualMediaTypeEnumData *data);
7877

packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFDataConverters.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ WKUserScriptInjectionTime FWFWKUserScriptInjectionTimeFromEnumData(
118118
return -1;
119119
}
120120

121-
API_AVAILABLE(ios(10.0))
122121
WKAudiovisualMediaTypes FWFWKAudiovisualMediaTypeFromEnumData(
123122
FWFWKAudiovisualMediaTypeEnumData *data) {
124123
switch (data.value) {

packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFHTTPCookieStoreHostApi.m

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,42 +20,28 @@ - (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager {
2020
return self;
2121
}
2222

23-
- (WKHTTPCookieStore *)HTTPCookieStoreForIdentifier:(NSNumber *)identifier
24-
API_AVAILABLE(ios(11.0)) {
23+
- (WKHTTPCookieStore *)HTTPCookieStoreForIdentifier:(NSNumber *)identifier {
2524
return (WKHTTPCookieStore *)[self.instanceManager instanceForIdentifier:identifier.longValue];
2625
}
2726

2827
- (void)createFromWebsiteDataStoreWithIdentifier:(nonnull NSNumber *)identifier
2928
dataStoreIdentifier:(nonnull NSNumber *)websiteDataStoreIdentifier
3029
error:(FlutterError *_Nullable __autoreleasing *_Nonnull)
3130
error {
32-
if (@available(iOS 11.0, *)) {
33-
WKWebsiteDataStore *dataStore = (WKWebsiteDataStore *)[self.instanceManager
34-
instanceForIdentifier:websiteDataStoreIdentifier.longValue];
35-
[self.instanceManager addDartCreatedInstance:dataStore.httpCookieStore
36-
withIdentifier:identifier.longValue];
37-
} else {
38-
*error = [FlutterError
39-
errorWithCode:@"FWFUnsupportedVersionError"
40-
message:@"WKWebsiteDataStore.httpCookieStore is only supported on versions 11+."
41-
details:nil];
42-
}
31+
WKWebsiteDataStore *dataStore = (WKWebsiteDataStore *)[self.instanceManager
32+
instanceForIdentifier:websiteDataStoreIdentifier.longValue];
33+
[self.instanceManager addDartCreatedInstance:dataStore.httpCookieStore
34+
withIdentifier:identifier.longValue];
4335
}
4436

4537
- (void)setCookieForStoreWithIdentifier:(nonnull NSNumber *)identifier
4638
cookie:(nonnull FWFNSHttpCookieData *)cookie
4739
completion:(nonnull void (^)(FlutterError *_Nullable))completion {
4840
NSHTTPCookie *nsCookie = FWFNSHTTPCookieFromCookieData(cookie);
4941

50-
if (@available(iOS 11.0, *)) {
51-
[[self HTTPCookieStoreForIdentifier:identifier] setCookie:nsCookie
52-
completionHandler:^{
53-
completion(nil);
54-
}];
55-
} else {
56-
completion([FlutterError errorWithCode:@"FWFUnsupportedVersionError"
57-
message:@"setCookie is only supported on versions 11+."
58-
details:nil]);
59-
}
42+
[[self HTTPCookieStoreForIdentifier:identifier] setCookie:nsCookie
43+
completionHandler:^{
44+
completion(nil);
45+
}];
6046
}
6147
@end

packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFWebViewConfigurationHostApi.m

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -117,28 +117,10 @@ - (void)setAllowsInlineMediaPlaybackForConfigurationWithIdentifier:(nonnull NSNu
117117

118118
WKWebViewConfiguration *configuration =
119119
(WKWebViewConfiguration *)[self webViewConfigurationForIdentifier:identifier];
120-
if (@available(iOS 10.0, *)) {
121-
WKAudiovisualMediaTypes typesInt = 0;
122-
for (FWFWKAudiovisualMediaTypeEnumData *data in types) {
123-
typesInt |= FWFWKAudiovisualMediaTypeFromEnumData(data);
124-
}
125-
[configuration setMediaTypesRequiringUserActionForPlayback:typesInt];
126-
} else {
127-
for (FWFWKAudiovisualMediaTypeEnumData *data in types) {
128-
switch (data.value) {
129-
#pragma clang diagnostic push
130-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
131-
case FWFWKAudiovisualMediaTypeEnumNone:
132-
configuration.requiresUserActionForMediaPlayback = false;
133-
break;
134-
case FWFWKAudiovisualMediaTypeEnumAudio:
135-
case FWFWKAudiovisualMediaTypeEnumVideo:
136-
case FWFWKAudiovisualMediaTypeEnumAll:
137-
configuration.requiresUserActionForMediaPlayback = true;
138-
break;
139-
#pragma clang diagnostic pop
140-
}
141-
}
120+
WKAudiovisualMediaTypes typesInt = 0;
121+
for (FWFWKAudiovisualMediaTypeEnumData *data in types) {
122+
typesInt |= FWFWKAudiovisualMediaTypeFromEnumData(data);
142123
}
124+
[configuration setMediaTypesRequiringUserActionForPlayback:typesInt];
143125
}
144126
@end

packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFWebViewHostApi.m

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ - (instancetype)initWithFrame:(CGRect)frame
2020
if (self) {
2121
_objectApi = [[FWFObjectFlutterApiImpl alloc] initWithBinaryMessenger:binaryMessenger
2222
instanceManager:instanceManager];
23-
if (@available(iOS 11.0, *)) {
24-
self.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
25-
if (@available(iOS 13.0, *)) {
26-
self.scrollView.automaticallyAdjustsScrollIndicatorInsets = NO;
27-
}
23+
24+
self.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
25+
if (@available(iOS 13.0, *)) {
26+
self.scrollView.automaticallyAdjustsScrollIndicatorInsets = NO;
2827
}
2928
}
3029
return self;
@@ -34,16 +33,15 @@ - (void)setFrame:(CGRect)frame {
3433
[super setFrame:frame];
3534
// Prevents the contentInsets from being adjusted by iOS and gives control to Flutter.
3635
self.scrollView.contentInset = UIEdgeInsetsZero;
37-
if (@available(iOS 11, *)) {
38-
// Above iOS 11, adjust contentInset to compensate the adjustedContentInset so the sum will
39-
// always be 0.
40-
if (UIEdgeInsetsEqualToEdgeInsets(self.scrollView.adjustedContentInset, UIEdgeInsetsZero)) {
41-
return;
42-
}
43-
UIEdgeInsets insetToAdjust = self.scrollView.adjustedContentInset;
44-
self.scrollView.contentInset = UIEdgeInsetsMake(-insetToAdjust.top, -insetToAdjust.left,
45-
-insetToAdjust.bottom, -insetToAdjust.right);
36+
37+
// Adjust contentInset to compensate the adjustedContentInset so the sum will
38+
// always be 0.
39+
if (UIEdgeInsetsEqualToEdgeInsets(self.scrollView.adjustedContentInset, UIEdgeInsetsZero)) {
40+
return;
4641
}
42+
UIEdgeInsets insetToAdjust = self.scrollView.adjustedContentInset;
43+
self.scrollView.contentInset = UIEdgeInsetsMake(-insetToAdjust.top, -insetToAdjust.left,
44+
-insetToAdjust.bottom, -insetToAdjust.right);
4745
}
4846

4947
- (void)observeValueForKeyPath:(NSString *)keyPath

packages/webview_flutter/webview_flutter_wkwebview/ios/webview_flutter_wkwebview.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.module_map = 'Classes/FlutterWebView.modulemap'
2020
s.dependency 'Flutter'
2121

22-
s.platform = :ios, '9.0'
23-
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
22+
s.platform = :ios, '11.0'
23+
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
2424
end

0 commit comments

Comments
 (0)