fixed WebResourceError iOS, updated code docs

This commit is contained in:
Lorenzo Pichilli 2022-10-12 00:37:06 +02:00
parent 5d70469caa
commit b790039696
5 changed files with 22 additions and 22 deletions

View File

@ -3,11 +3,11 @@
export "FLUTTER_ROOT=/Users/lorenzopichilli/fvm/versions/2.10.4"
export "FLUTTER_APPLICATION_PATH=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=integration_test/webview_flutter_test.dart"
export "FLUTTER_TARGET=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example/lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ=="
export "DART_DEFINES=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl,RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ=="
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"

View File

@ -1819,8 +1819,8 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate,
InAppWebView.credentialsProposed = []
var urlError: URL = url ?? URL(string: "about:blank")!
var errorCode = error._code
var errorDescription = error.localizedDescription
var errorCode = -1
var errorDescription = "domain=\(error._domain), code=\(error._code), \(error.localizedDescription)"
if let info = error as? URLError {
if let failingURL = info.failingURL {

View File

@ -37,7 +37,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
///**NOTE**: Not available in a Trusted Web Activity.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- Android
CustomTabsShareState shareState;
///Set to `false` if the title shouldn't be shown in the custom tab. The default value is `true`.
@ -45,13 +45,13 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
///**NOTE**: Not available in a Trusted Web Activity.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- Android
bool showTitle;
///Set the custom background color of the toolbar.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- Android
Color? toolbarBackgroundColor;
///Set to `true` to enable the url bar to hide as the user scrolls down on the page. The default value is `false`.
@ -59,7 +59,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
///**NOTE**: Not available in a Trusted Web Activity.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- Android
bool enableUrlBarHiding;
///Set to `true` to enable Instant Apps. The default value is `false`.
@ -67,7 +67,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
///**NOTE**: Not available in a Trusted Web Activity.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- Android
bool instantAppsEnabled;
///Set an explicit application package name that limits
@ -77,31 +77,31 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
///application package.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- Android
String? packageName;
///Set to `true` to enable Keep Alive. The default value is `false`.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- Android
bool keepAliveEnabled;
///Set to `true` to launch the Android activity in `singleInstance` mode. The default value is `false`.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- Android
bool isSingleInstance;
///Set to `true` to launch the Android intent with the flag `FLAG_ACTIVITY_NO_HISTORY`. The default value is `false`.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- Android
bool noHistory;
///Set to `true` to launch the Custom Tab as a Trusted Web Activity. The default value is `false`.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- Android
bool isTrustedWebActivity;
///Sets a list of additional trusted origins that the user may navigate or be redirected to from the starting uri.
@ -109,7 +109,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
///**NOTE**: Available only in a Trusted Web Activity.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- Android
List<String> additionalTrustedOrigins;
///Sets a display mode of a Trusted Web Activity.
@ -117,7 +117,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
///**NOTE**: Available only in a Trusted Web Activity.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- Android
TrustedWebActivityDisplayMode? displayMode;
///Sets a screen orientation. This can be used e.g. to enable the locking of an orientation lock type.
@ -125,7 +125,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
///**NOTE**: Available only in a Trusted Web Activity.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- Android
TrustedWebActivityScreenOrientation screenOrientation;
///Set to `true` if Reader mode should be entered automatically when it is available for the webpage. The default value is `false`.

View File

@ -14,14 +14,10 @@ import 'types/main.dart';
///On Android, it is implemented using [CookieManager](https://developer.android.com/reference/android/webkit/CookieManager).
///On iOS, it is implemented using [WKHTTPCookieStore](https://developer.apple.com/documentation/webkit/wkhttpcookiestore).
///
///**NOTE for iOS below 11.0 (LIMITED SUPPORT!)**: in this case, almost all of the methods ([CookieManager.deleteAllCookies] and [CookieManager.getAllCookies] are not supported!)
///**NOTE for iOS below 11.0 and Web platform (LIMITED SUPPORT!)**: in this case, almost all of the methods ([CookieManager.deleteAllCookies] and [CookieManager.getAllCookies] are not supported!)
///has been implemented using JavaScript because there is no other way to work with them on iOS below 11.0.
///See https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies for JavaScript restrictions.
///
///**NOTE for Web (LIMITED SUPPORT!)**: in this case, almost all of the methods ([CookieManager.deleteAllCookies] and [CookieManager.getAllCookies] are not supported!)
///has been implemented using JavaScript, so all methods will have effect only if the iframe has the same origin.
///See https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies for JavaScript restrictions.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- iOS

View File

@ -13,6 +13,10 @@ import '../types/main.dart';
///On iOS, it is implemented using [WKWebsiteDataStore.default()](https://developer.apple.com/documentation/webkit/wkwebsitedatastore).
///
///**NOTE for iOS**: available from iOS 9.0+.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
///- iOS
class WebStorageManager {
static WebStorageManager? _instance;
static const MethodChannel _staticChannel = WEB_STORAGE_STATIC_CHANNEL;