fixed WebResourceError iOS, updated code docs
This commit is contained in:
parent
5d70469caa
commit
b790039696
|
@ -3,11 +3,11 @@
|
||||||
export "FLUTTER_ROOT=/Users/lorenzopichilli/fvm/versions/2.10.4"
|
export "FLUTTER_ROOT=/Users/lorenzopichilli/fvm/versions/2.10.4"
|
||||||
export "FLUTTER_APPLICATION_PATH=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example"
|
export "FLUTTER_APPLICATION_PATH=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example"
|
||||||
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
|
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_DIR=build"
|
||||||
export "FLUTTER_BUILD_NAME=1.0.0"
|
export "FLUTTER_BUILD_NAME=1.0.0"
|
||||||
export "FLUTTER_BUILD_NUMBER=1"
|
export "FLUTTER_BUILD_NUMBER=1"
|
||||||
export "DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ=="
|
export "DART_DEFINES=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl,RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ=="
|
||||||
export "DART_OBFUSCATION=false"
|
export "DART_OBFUSCATION=false"
|
||||||
export "TRACK_WIDGET_CREATION=true"
|
export "TRACK_WIDGET_CREATION=true"
|
||||||
export "TREE_SHAKE_ICONS=false"
|
export "TREE_SHAKE_ICONS=false"
|
||||||
|
|
|
@ -1819,8 +1819,8 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate,
|
||||||
InAppWebView.credentialsProposed = []
|
InAppWebView.credentialsProposed = []
|
||||||
|
|
||||||
var urlError: URL = url ?? URL(string: "about:blank")!
|
var urlError: URL = url ?? URL(string: "about:blank")!
|
||||||
var errorCode = error._code
|
var errorCode = -1
|
||||||
var errorDescription = error.localizedDescription
|
var errorDescription = "domain=\(error._domain), code=\(error._code), \(error.localizedDescription)"
|
||||||
|
|
||||||
if let info = error as? URLError {
|
if let info = error as? URLError {
|
||||||
if let failingURL = info.failingURL {
|
if let failingURL = info.failingURL {
|
||||||
|
|
|
@ -37,7 +37,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android
|
||||||
CustomTabsShareState shareState;
|
CustomTabsShareState shareState;
|
||||||
|
|
||||||
///Set to `false` if the title shouldn't be shown in the custom tab. The default value is `true`.
|
///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.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android
|
||||||
bool showTitle;
|
bool showTitle;
|
||||||
|
|
||||||
///Set the custom background color of the toolbar.
|
///Set the custom background color of the toolbar.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android
|
||||||
Color? toolbarBackgroundColor;
|
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`.
|
///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.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android
|
||||||
bool enableUrlBarHiding;
|
bool enableUrlBarHiding;
|
||||||
|
|
||||||
///Set to `true` to enable Instant Apps. The default value is `false`.
|
///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.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android
|
||||||
bool instantAppsEnabled;
|
bool instantAppsEnabled;
|
||||||
|
|
||||||
///Set an explicit application package name that limits
|
///Set an explicit application package name that limits
|
||||||
|
@ -77,31 +77,31 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
||||||
///application package.
|
///application package.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android
|
||||||
String? packageName;
|
String? packageName;
|
||||||
|
|
||||||
///Set to `true` to enable Keep Alive. The default value is `false`.
|
///Set to `true` to enable Keep Alive. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android
|
||||||
bool keepAliveEnabled;
|
bool keepAliveEnabled;
|
||||||
|
|
||||||
///Set to `true` to launch the Android activity in `singleInstance` mode. The default value is `false`.
|
///Set to `true` to launch the Android activity in `singleInstance` mode. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android
|
||||||
bool isSingleInstance;
|
bool isSingleInstance;
|
||||||
|
|
||||||
///Set to `true` to launch the Android intent with the flag `FLAG_ACTIVITY_NO_HISTORY`. The default value is `false`.
|
///Set to `true` to launch the Android intent with the flag `FLAG_ACTIVITY_NO_HISTORY`. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android
|
||||||
bool noHistory;
|
bool noHistory;
|
||||||
|
|
||||||
///Set to `true` to launch the Custom Tab as a Trusted Web Activity. The default value is `false`.
|
///Set to `true` to launch the Custom Tab as a Trusted Web Activity. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android
|
||||||
bool isTrustedWebActivity;
|
bool isTrustedWebActivity;
|
||||||
|
|
||||||
///Sets a list of additional trusted origins that the user may navigate or be redirected to from the starting uri.
|
///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.
|
///**NOTE**: Available only in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android
|
||||||
List<String> additionalTrustedOrigins;
|
List<String> additionalTrustedOrigins;
|
||||||
|
|
||||||
///Sets a display mode of a Trusted Web Activity.
|
///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.
|
///**NOTE**: Available only in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android
|
||||||
TrustedWebActivityDisplayMode? displayMode;
|
TrustedWebActivityDisplayMode? displayMode;
|
||||||
|
|
||||||
///Sets a screen orientation. This can be used e.g. to enable the locking of an orientation lock type.
|
///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.
|
///**NOTE**: Available only in a Trusted Web Activity.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android
|
||||||
TrustedWebActivityScreenOrientation screenOrientation;
|
TrustedWebActivityScreenOrientation screenOrientation;
|
||||||
|
|
||||||
///Set to `true` if Reader mode should be entered automatically when it is available for the webpage. The default value is `false`.
|
///Set to `true` if Reader mode should be entered automatically when it is available for the webpage. The default value is `false`.
|
||||||
|
|
|
@ -14,14 +14,10 @@ import 'types/main.dart';
|
||||||
///On Android, it is implemented using [CookieManager](https://developer.android.com/reference/android/webkit/CookieManager).
|
///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).
|
///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.
|
///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.
|
///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**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
|
|
|
@ -13,6 +13,10 @@ import '../types/main.dart';
|
||||||
///On iOS, it is implemented using [WKWebsiteDataStore.default()](https://developer.apple.com/documentation/webkit/wkwebsitedatastore).
|
///On iOS, it is implemented using [WKWebsiteDataStore.default()](https://developer.apple.com/documentation/webkit/wkwebsitedatastore).
|
||||||
///
|
///
|
||||||
///**NOTE for iOS**: available from iOS 9.0+.
|
///**NOTE for iOS**: available from iOS 9.0+.
|
||||||
|
///
|
||||||
|
///**Supported Platforms/Implementations**:
|
||||||
|
///- Android native WebView
|
||||||
|
///- iOS
|
||||||
class WebStorageManager {
|
class WebStorageManager {
|
||||||
static WebStorageManager? _instance;
|
static WebStorageManager? _instance;
|
||||||
static const MethodChannel _staticChannel = WEB_STORAGE_STATIC_CHANNEL;
|
static const MethodChannel _staticChannel = WEB_STORAGE_STATIC_CHANNEL;
|
||||||
|
|
Loading…
Reference in New Issue