-
Notifications
You must be signed in to change notification settings - Fork 29.3k
Closed
flutter/packages
#8564Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listp: webviewThe WebView pluginThe WebView pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Description
webview_flutter_wkwebview
is using an API that was deprecated in iOS 14. Use an @availability
check to use the non-deprecated property, and fall back to the old one on < 14.
[[self preferencesForIdentifier:identifier] setJavaScriptEnabled:enabled.boolValue];
Deprecation says Use WKWebpagePreferences.allowsContentJavaScript to disable content JavaScript on a per-navigation basis
. I don't think WKWebpagePreferences
is currently created in the plugin.
FWFPreferencesHostApi.m:44:47: error: 'setJavaScriptEnabled:' is deprecated: first deprecated in iOS 14.0 - Use WKWebpagePreferences.allowsContentJavaScript to disable content JavaScript on a per-navigation basis [-Werror,-Wdeprecated-declarations]
[[self preferencesForIdentifier:identifier] setJavaScriptEnabled:enabled.boolValue];
^
In module 'WebKit' imported from FWFPreferencesHostApi.h:6:
WKPreferences.h:92:28: note: property 'javaScriptEnabled' is declared deprecated here
@property (nonatomic) BOOL javaScriptEnabled API_DEPRECATED("Use WKWebpagePreferences.allowsContentJavaScript to disable content JavaScript on a per-navigation basis", macos(10.10, 11.0), ios(8.0, 14.0));
You can see this by running:
$ dart run script/tool/bin/flutter_plugin_tools.dart xcode-analyze "--ios-min-version=14.0" --ios
args: ["xcode-analyze", "--ios", "--ios-min-version=14.0"]
aragonet
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listp: webviewThe WebView pluginThe WebView pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team