Updated code docs, Fixed some missing macOS asserts, fix #1447
This commit is contained in:
parent
2d32eff3f0
commit
fc98712f30
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -1,3 +1,9 @@
|
||||||
|
## 6.0.0-beta.19
|
||||||
|
|
||||||
|
- Updated code docs
|
||||||
|
- Fixed "Cannot Grant Permission at Android 21" [#1447](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1447)
|
||||||
|
- Fixed some missing macOS asserts
|
||||||
|
|
||||||
## 6.0.0-beta.18
|
## 6.0.0-beta.18
|
||||||
|
|
||||||
- Fixed `InAppWebViewSettings` automatic infer if `initialSettings` is `null`
|
- Fixed `InAppWebViewSettings` automatic infer if `initialSettings` is `null`
|
||||||
|
@ -158,6 +164,10 @@
|
||||||
- Removed `URLProtectionSpace.iosIsProxy` property
|
- Removed `URLProtectionSpace.iosIsProxy` property
|
||||||
- `historyUrl` and `baseUrl` of `InAppWebViewInitialData` can be `null`
|
- `historyUrl` and `baseUrl` of `InAppWebViewInitialData` can be `null`
|
||||||
|
|
||||||
|
## 5.7.2+1
|
||||||
|
|
||||||
|
- Fixed "Cannot Grant Permission at Android 21" [#1447](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1447)
|
||||||
|
|
||||||
## 5.7.2
|
## 5.7.2
|
||||||
|
|
||||||
- Removed Android Hybrid Composition constraint to use the pull-to-refresh feature
|
- Removed Android Hybrid Composition constraint to use the pull-to-refresh feature
|
||||||
|
|
|
@ -1211,7 +1211,7 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPermissionRequest(final PermissionRequest request) {
|
public void onPermissionRequest(final PermissionRequest request) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
final WebViewChannelDelegate.PermissionRequestCallback callback = new WebViewChannelDelegate.PermissionRequestCallback() {
|
final WebViewChannelDelegate.PermissionRequestCallback callback = new WebViewChannelDelegate.PermissionRequestCallback() {
|
||||||
@Override
|
@Override
|
||||||
public boolean nonNullSuccess(@NonNull PermissionResponse response) {
|
public boolean nonNullSuccess(@NonNull PermissionResponse response) {
|
||||||
|
|
|
@ -34,7 +34,13 @@ abstract class Util {
|
||||||
final platformName = platform.getField("name")!.toStringValue();
|
final platformName = platform.getField("name")!.toStringValue();
|
||||||
final note = platform.getField("note")?.toStringValue();
|
final note = platform.getField("note")?.toStringValue();
|
||||||
if (note != null) {
|
if (note != null) {
|
||||||
platformNoteList.add("///**NOTE for $platformName**: $note");
|
final noteLines = note.split("\n");
|
||||||
|
var platformNote =
|
||||||
|
"///**NOTE for $platformName**: ${noteLines[0].trim()}";
|
||||||
|
for (int i = 1; i < noteLines.length; i++) {
|
||||||
|
platformNote += "\n///${noteLines[i].trim()}";
|
||||||
|
}
|
||||||
|
platformNoteList.add(platformNote);
|
||||||
}
|
}
|
||||||
|
|
||||||
final apiName = platform.getField("apiName")?.toStringValue();
|
final apiName = platform.getField("apiName")?.toStringValue();
|
||||||
|
|
|
@ -45,7 +45,7 @@ void openAndClose() {
|
||||||
activityButton: ActivityButton(
|
activityButton: ActivityButton(
|
||||||
templateImage: UIImage(systemName: "sun.max"),
|
templateImage: UIImage(systemName: "sun.max"),
|
||||||
extensionIdentifier:
|
extensionIdentifier:
|
||||||
"com.pichillilorenzo.flutter-inappwebview-6-Example.test")));
|
"com.pichillilorenzo.flutter-inappwebview6-example.test")));
|
||||||
await chromeSafariBrowser.opened.future;
|
await chromeSafariBrowser.opened.future;
|
||||||
expect(chromeSafariBrowser.isOpened(), true);
|
expect(chromeSafariBrowser.isOpened(), true);
|
||||||
expect(() async {
|
expect(() async {
|
||||||
|
|
|
@ -451,7 +451,7 @@
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview-6-Example.test";
|
PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview6-example.test";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
@ -484,7 +484,7 @@
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview-6-Example.test";
|
PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview6-example.test";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
|
@ -627,7 +627,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview-6-Example";
|
PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview6-example";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
@ -659,7 +659,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview-6-Example";
|
PRODUCT_BUNDLE_IDENTIFIER = "com.pichillilorenzo.flutter-inappwebview6-example";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
|
|
@ -208,7 +208,7 @@ class ChromeSafariBrowser {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
ChromeSafariBrowserClassOptions? options,
|
ChromeSafariBrowserClassOptions? options,
|
||||||
ChromeSafariBrowserSettings? settings}) async {
|
ChromeSafariBrowserSettings? settings}) async {
|
||||||
if (!kIsWeb && defaultTargetPlatform == TargetPlatform.iOS) {
|
if (Util.isIOS) {
|
||||||
assert(url != null, 'The specified URL must not be null on iOS.');
|
assert(url != null, 'The specified URL must not be null on iOS.');
|
||||||
assert(['http', 'https'].contains(url!.scheme),
|
assert(['http', 'https'].contains(url!.scheme),
|
||||||
'The specified URL has an unsupported scheme. Only HTTP and HTTPS URLs are supported on iOS.');
|
'The specified URL has an unsupported scheme. Only HTTP and HTTPS URLs are supported on iOS.');
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
||||||
|
|
||||||
import '../types/activity_button.dart';
|
import '../types/activity_button.dart';
|
||||||
|
@ -341,10 +340,9 @@ class ChromeSafariBrowserClassOptions {
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
Map<String, dynamic> options = {};
|
Map<String, dynamic> options = {};
|
||||||
if (defaultTargetPlatform == TargetPlatform.android)
|
if (Util.isAndroid)
|
||||||
options.addAll(this.android?.toMap() ?? {});
|
options.addAll(this.android?.toMap() ?? {});
|
||||||
else if (defaultTargetPlatform == TargetPlatform.iOS)
|
else if (Util.isIOS) options.addAll(this.ios?.toMap() ?? {});
|
||||||
options.addAll(this.ios?.toMap() ?? {});
|
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
|
|
||||||
import 'in_app_webview/webview.dart';
|
import 'in_app_webview/webview.dart';
|
||||||
import 'types/main.dart';
|
import 'types/main.dart';
|
||||||
|
import 'util.dart';
|
||||||
|
|
||||||
///Class that represents the WebView context menu. It used by [WebView.contextMenu].
|
///Class that represents the WebView context menu. It used by [WebView.contextMenu].
|
||||||
///
|
///
|
||||||
|
@ -89,11 +88,11 @@ class ContextMenuItem {
|
||||||
@Deprecated("Use id instead") this.iosId,
|
@Deprecated("Use id instead") this.iosId,
|
||||||
required this.title,
|
required this.title,
|
||||||
this.action}) {
|
this.action}) {
|
||||||
if (defaultTargetPlatform == TargetPlatform.android) {
|
if (Util.isAndroid) {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.id = this.id ?? this.androidId;
|
this.id = this.id ?? this.androidId;
|
||||||
assert(this.id is int);
|
assert(this.id is int);
|
||||||
} else if (defaultTargetPlatform == TargetPlatform.iOS) {
|
} else if (Util.isIOS) {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.id = this.id ?? this.iosId;
|
this.id = this.id ?? this.iosId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import 'in_app_webview/headless_in_app_webview.dart';
|
||||||
import 'platform_util.dart';
|
import 'platform_util.dart';
|
||||||
|
|
||||||
import 'types/main.dart';
|
import 'types/main.dart';
|
||||||
|
import 'util.dart';
|
||||||
import 'web_uri.dart';
|
import 'web_uri.dart';
|
||||||
|
|
||||||
///Class that implements a singleton object (shared instance) which manages the cookies used by WebView instances.
|
///Class that implements a singleton object (shared instance) which manages the cookies used by WebView instances.
|
||||||
|
@ -519,14 +520,13 @@ class CookieManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> _shouldUseJavascript() async {
|
Future<bool> _shouldUseJavascript() async {
|
||||||
if (kIsWeb) {
|
if (Util.isWeb) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (defaultTargetPlatform == TargetPlatform.iOS ||
|
if (Util.isIOS || Util.isMacOS) {
|
||||||
defaultTargetPlatform == TargetPlatform.macOS) {
|
|
||||||
final platformUtil = PlatformUtil.instance();
|
final platformUtil = PlatformUtil.instance();
|
||||||
final systemVersion = await platformUtil.getSystemVersion();
|
final systemVersion = await platformUtil.getSystemVersion();
|
||||||
return defaultTargetPlatform == TargetPlatform.iOS
|
return Util.isIOS
|
||||||
? systemVersion.compareTo("11") == -1
|
? systemVersion.compareTo("11") == -1
|
||||||
: systemVersion.compareTo("10.13") == -1;
|
: systemVersion.compareTo("10.13") == -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -972,7 +972,7 @@ class InAppBrowser {
|
||||||
///[permissionRequest] represents the permission request with an array of resources the web content wants to access
|
///[permissionRequest] represents the permission request with an array of resources the web content wants to access
|
||||||
///and the origin of the web page which is trying to access the restricted resources.
|
///and the origin of the web page which is trying to access the restricted resources.
|
||||||
///
|
///
|
||||||
///**NOTE for Android**: available only on Android 23+.
|
///**NOTE for Android**: available only on Android 21+.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS**: available only on iOS 15.0+. The default [PermissionResponse.action] is [PermissionResponseAction.PROMPT].
|
///**NOTE for iOS**: available only on iOS 15.0+. The default [PermissionResponse.action] is [PermissionResponseAction.PROMPT].
|
||||||
///
|
///
|
||||||
|
|
|
@ -350,10 +350,10 @@ class InAppBrowserClassOptions {
|
||||||
|
|
||||||
options.addAll(this.crossPlatform.toMap());
|
options.addAll(this.crossPlatform.toMap());
|
||||||
options.addAll(this.inAppWebViewGroupOptions.crossPlatform.toMap());
|
options.addAll(this.inAppWebViewGroupOptions.crossPlatform.toMap());
|
||||||
if (defaultTargetPlatform == TargetPlatform.android) {
|
if (Util.isAndroid) {
|
||||||
options.addAll(this.android.toMap());
|
options.addAll(this.android.toMap());
|
||||||
options.addAll(this.inAppWebViewGroupOptions.android.toMap());
|
options.addAll(this.inAppWebViewGroupOptions.android.toMap());
|
||||||
} else if (defaultTargetPlatform == TargetPlatform.iOS) {
|
} else if (Util.isIOS) {
|
||||||
options.addAll(this.ios.toMap());
|
options.addAll(this.ios.toMap());
|
||||||
options.addAll(this.inAppWebViewGroupOptions.ios.toMap());
|
options.addAll(this.inAppWebViewGroupOptions.ios.toMap());
|
||||||
}
|
}
|
||||||
|
@ -380,12 +380,12 @@ class InAppBrowserClassOptions {
|
||||||
InAppWebViewGroupOptions();
|
InAppWebViewGroupOptions();
|
||||||
inAppBrowserClassOptions.inAppWebViewGroupOptions.crossPlatform =
|
inAppBrowserClassOptions.inAppWebViewGroupOptions.crossPlatform =
|
||||||
InAppWebViewOptions.fromMap(options);
|
InAppWebViewOptions.fromMap(options);
|
||||||
if (defaultTargetPlatform == TargetPlatform.android) {
|
if (Util.isAndroid) {
|
||||||
inAppBrowserClassOptions.android =
|
inAppBrowserClassOptions.android =
|
||||||
AndroidInAppBrowserOptions.fromMap(options);
|
AndroidInAppBrowserOptions.fromMap(options);
|
||||||
inAppBrowserClassOptions.inAppWebViewGroupOptions.android =
|
inAppBrowserClassOptions.inAppWebViewGroupOptions.android =
|
||||||
AndroidInAppWebViewOptions.fromMap(options);
|
AndroidInAppWebViewOptions.fromMap(options);
|
||||||
} else if (defaultTargetPlatform == TargetPlatform.iOS) {
|
} else if (Util.isIOS) {
|
||||||
inAppBrowserClassOptions.ios = IOSInAppBrowserOptions.fromMap(options);
|
inAppBrowserClassOptions.ios = IOSInAppBrowserOptions.fromMap(options);
|
||||||
inAppBrowserClassOptions.inAppWebViewGroupOptions.ios =
|
inAppBrowserClassOptions.inAppWebViewGroupOptions.ios =
|
||||||
IOSInAppWebViewOptions.fromMap(options);
|
IOSInAppWebViewOptions.fromMap(options);
|
||||||
|
|
|
@ -639,7 +639,7 @@ class _InAppWebViewState extends State<InAppWebView> {
|
||||||
widget.pullToRefreshController?.options.toMap() ??
|
widget.pullToRefreshController?.options.toMap() ??
|
||||||
PullToRefreshSettings(enabled: false).toMap();
|
PullToRefreshSettings(enabled: false).toMap();
|
||||||
|
|
||||||
if (kIsWeb) {
|
if (Util.isWeb) {
|
||||||
return HtmlElementView(
|
return HtmlElementView(
|
||||||
viewType: 'com.pichillilorenzo/flutter_inappwebview',
|
viewType: 'com.pichillilorenzo/flutter_inappwebview',
|
||||||
onPlatformViewCreated: (int viewId) {
|
onPlatformViewCreated: (int viewId) {
|
||||||
|
@ -659,7 +659,7 @@ class _InAppWebViewState extends State<InAppWebView> {
|
||||||
_onPlatformViewCreated(viewId);
|
_onPlatformViewCreated(viewId);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
} else if (defaultTargetPlatform == TargetPlatform.android) {
|
} else if (Util.isAndroid) {
|
||||||
var useHybridComposition = (widget.initialSettings != null
|
var useHybridComposition = (widget.initialSettings != null
|
||||||
? initialSettings.useHybridComposition
|
? initialSettings.useHybridComposition
|
||||||
:
|
:
|
||||||
|
@ -710,9 +710,7 @@ class _InAppWebViewState extends State<InAppWebView> {
|
||||||
..create();
|
..create();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
} else if (defaultTargetPlatform ==
|
} else if (Util.isIOS /* || Util.isMacOS*/) {
|
||||||
TargetPlatform
|
|
||||||
.iOS /* || defaultTargetPlatform == TargetPlatform.macOS*/) {
|
|
||||||
return UiKitView(
|
return UiKitView(
|
||||||
viewType: 'com.pichillilorenzo/flutter_inappwebview',
|
viewType: 'com.pichillilorenzo/flutter_inappwebview',
|
||||||
onPlatformViewCreated: _onPlatformViewCreated,
|
onPlatformViewCreated: _onPlatformViewCreated,
|
||||||
|
|
|
@ -1976,8 +1976,7 @@ class InAppWebViewController {
|
||||||
args.putIfAbsent('source', () => source);
|
args.putIfAbsent('source', () => source);
|
||||||
args.putIfAbsent('contentWorld', () => contentWorld?.toMap());
|
args.putIfAbsent('contentWorld', () => contentWorld?.toMap());
|
||||||
var data = await _channel.invokeMethod('evaluateJavascript', args);
|
var data = await _channel.invokeMethod('evaluateJavascript', args);
|
||||||
if (data != null &&
|
if (data != null && (Util.isAndroid || Util.isWeb)) {
|
||||||
(defaultTargetPlatform == TargetPlatform.android || kIsWeb)) {
|
|
||||||
try {
|
try {
|
||||||
// try to json decode the data coming from JavaScript
|
// try to json decode the data coming from JavaScript
|
||||||
// otherwise return it as it is.
|
// otherwise return it as it is.
|
||||||
|
@ -2497,10 +2496,8 @@ class InAppWebViewController {
|
||||||
{required double zoomFactor,
|
{required double zoomFactor,
|
||||||
@Deprecated('Use animated instead') bool? iosAnimated,
|
@Deprecated('Use animated instead') bool? iosAnimated,
|
||||||
bool animated = false}) async {
|
bool animated = false}) async {
|
||||||
assert(defaultTargetPlatform != TargetPlatform.android ||
|
assert(!Util.isAndroid ||
|
||||||
(defaultTargetPlatform == TargetPlatform.android &&
|
(Util.isAndroid && zoomFactor > 0.01 && zoomFactor <= 100.0));
|
||||||
zoomFactor > 0.01 &&
|
|
||||||
zoomFactor <= 100.0));
|
|
||||||
|
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('zoomFactor', () => zoomFactor);
|
args.putIfAbsent('zoomFactor', () => zoomFactor);
|
||||||
|
@ -2819,8 +2816,7 @@ class InAppWebViewController {
|
||||||
///- iOS ([Official API - WKUserContentController.addUserScript](https://developer.apple.com/documentation/webkit/wkusercontentcontroller/1537448-adduserscript))
|
///- iOS ([Official API - WKUserContentController.addUserScript](https://developer.apple.com/documentation/webkit/wkusercontentcontroller/1537448-adduserscript))
|
||||||
///- MacOS ([Official API - WKUserContentController.addUserScript](https://developer.apple.com/documentation/webkit/wkusercontentcontroller/1537448-adduserscript))
|
///- MacOS ([Official API - WKUserContentController.addUserScript](https://developer.apple.com/documentation/webkit/wkusercontentcontroller/1537448-adduserscript))
|
||||||
Future<void> addUserScript({required UserScript userScript}) async {
|
Future<void> addUserScript({required UserScript userScript}) async {
|
||||||
assert(_webview?.windowId == null ||
|
assert(_webview?.windowId == null || (!Util.isIOS && !Util.isMacOS));
|
||||||
defaultTargetPlatform != TargetPlatform.iOS);
|
|
||||||
|
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('userScript', () => userScript.toMap());
|
args.putIfAbsent('userScript', () => userScript.toMap());
|
||||||
|
@ -2842,8 +2838,7 @@ class InAppWebViewController {
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
Future<void> addUserScripts({required List<UserScript> userScripts}) async {
|
Future<void> addUserScripts({required List<UserScript> userScripts}) async {
|
||||||
assert(_webview?.windowId == null ||
|
assert(_webview?.windowId == null || (!Util.isIOS && !Util.isMacOS));
|
||||||
defaultTargetPlatform != TargetPlatform.iOS);
|
|
||||||
|
|
||||||
for (var i = 0; i < userScripts.length; i++) {
|
for (var i = 0; i < userScripts.length; i++) {
|
||||||
await addUserScript(userScript: userScripts[i]);
|
await addUserScript(userScript: userScripts[i]);
|
||||||
|
@ -2863,8 +2858,7 @@ class InAppWebViewController {
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
Future<bool> removeUserScript({required UserScript userScript}) async {
|
Future<bool> removeUserScript({required UserScript userScript}) async {
|
||||||
assert(_webview?.windowId == null ||
|
assert(_webview?.windowId == null || (!Util.isIOS && !Util.isMacOS));
|
||||||
defaultTargetPlatform != TargetPlatform.iOS);
|
|
||||||
|
|
||||||
var index = _userScripts[userScript.injectionTime]?.indexOf(userScript);
|
var index = _userScripts[userScript.injectionTime]?.indexOf(userScript);
|
||||||
if (index == null || index == -1) {
|
if (index == null || index == -1) {
|
||||||
|
@ -2892,8 +2886,7 @@ class InAppWebViewController {
|
||||||
///- iOS
|
///- iOS
|
||||||
///- MacOS
|
///- MacOS
|
||||||
Future<void> removeUserScriptsByGroupName({required String groupName}) async {
|
Future<void> removeUserScriptsByGroupName({required String groupName}) async {
|
||||||
assert(_webview?.windowId == null ||
|
assert(_webview?.windowId == null || (!Util.isIOS && !Util.isMacOS));
|
||||||
defaultTargetPlatform != TargetPlatform.iOS);
|
|
||||||
|
|
||||||
final List<UserScript> userScriptsAtDocumentStart = List.from(
|
final List<UserScript> userScriptsAtDocumentStart = List.from(
|
||||||
_userScripts[UserScriptInjectionTime.AT_DOCUMENT_START] ?? []);
|
_userScripts[UserScriptInjectionTime.AT_DOCUMENT_START] ?? []);
|
||||||
|
@ -2929,8 +2922,7 @@ class InAppWebViewController {
|
||||||
///- MacOS
|
///- MacOS
|
||||||
Future<void> removeUserScripts(
|
Future<void> removeUserScripts(
|
||||||
{required List<UserScript> userScripts}) async {
|
{required List<UserScript> userScripts}) async {
|
||||||
assert(_webview?.windowId == null ||
|
assert(_webview?.windowId == null || (!Util.isIOS && !Util.isMacOS));
|
||||||
defaultTargetPlatform != TargetPlatform.iOS);
|
|
||||||
|
|
||||||
for (final userScript in userScripts) {
|
for (final userScript in userScripts) {
|
||||||
await removeUserScript(userScript: userScript);
|
await removeUserScript(userScript: userScript);
|
||||||
|
@ -2948,8 +2940,7 @@ class InAppWebViewController {
|
||||||
///- iOS ([Official API - WKUserContentController.removeAllUserScripts](https://developer.apple.com/documentation/webkit/wkusercontentcontroller/1536540-removealluserscripts))
|
///- iOS ([Official API - WKUserContentController.removeAllUserScripts](https://developer.apple.com/documentation/webkit/wkusercontentcontroller/1536540-removealluserscripts))
|
||||||
///- MacOS ([Official API - WKUserContentController.removeAllUserScripts](https://developer.apple.com/documentation/webkit/wkusercontentcontroller/1536540-removealluserscripts))
|
///- MacOS ([Official API - WKUserContentController.removeAllUserScripts](https://developer.apple.com/documentation/webkit/wkusercontentcontroller/1536540-removealluserscripts))
|
||||||
Future<void> removeAllUserScripts() async {
|
Future<void> removeAllUserScripts() async {
|
||||||
assert(_webview?.windowId == null ||
|
assert(_webview?.windowId == null || (!Util.isIOS && !Util.isMacOS));
|
||||||
defaultTargetPlatform != TargetPlatform.iOS);
|
|
||||||
|
|
||||||
_userScripts[UserScriptInjectionTime.AT_DOCUMENT_START]?.clear();
|
_userScripts[UserScriptInjectionTime.AT_DOCUMENT_START]?.clear();
|
||||||
_userScripts[UserScriptInjectionTime.AT_DOCUMENT_END]?.clear();
|
_userScripts[UserScriptInjectionTime.AT_DOCUMENT_END]?.clear();
|
||||||
|
@ -3003,7 +2994,7 @@ class InAppWebViewController {
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (defaultTargetPlatform == TargetPlatform.android) {
|
if (Util.isAndroid) {
|
||||||
data = json.decode(data);
|
data = json.decode(data);
|
||||||
}
|
}
|
||||||
return CallAsyncJavaScriptResult(
|
return CallAsyncJavaScriptResult(
|
||||||
|
@ -3031,9 +3022,9 @@ class InAppWebViewController {
|
||||||
Future<String?> saveWebArchive(
|
Future<String?> saveWebArchive(
|
||||||
{required String filePath, bool autoname = false}) async {
|
{required String filePath, bool autoname = false}) async {
|
||||||
if (!autoname) {
|
if (!autoname) {
|
||||||
if (defaultTargetPlatform == TargetPlatform.android) {
|
if (Util.isAndroid) {
|
||||||
assert(filePath.endsWith("." + WebArchiveFormat.MHT.toNativeValue()));
|
assert(filePath.endsWith("." + WebArchiveFormat.MHT.toNativeValue()));
|
||||||
} else if (defaultTargetPlatform == TargetPlatform.iOS) {
|
} else if (Util.isIOS || Util.isMacOS) {
|
||||||
assert(filePath
|
assert(filePath
|
||||||
.endsWith("." + WebArchiveFormat.WEBARCHIVE.toNativeValue()));
|
.endsWith("." + WebArchiveFormat.WEBARCHIVE.toNativeValue()));
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -616,7 +616,7 @@ abstract class WebView {
|
||||||
///[permissionRequest] represents the permission request with an array of resources the web content wants to access
|
///[permissionRequest] represents the permission request with an array of resources the web content wants to access
|
||||||
///and the origin of the web page which is trying to access the restricted resources.
|
///and the origin of the web page which is trying to access the restricted resources.
|
||||||
///
|
///
|
||||||
///**NOTE for Android**: available only on Android 23+.
|
///**NOTE for Android**: available only on Android 21+.
|
||||||
///
|
///
|
||||||
///**NOTE for iOS**: available only on iOS 15.0+. The default [PermissionResponse.action] is [PermissionResponseAction.PROMPT].
|
///**NOTE for iOS**: available only on iOS 15.0+. The default [PermissionResponse.action] is [PermissionResponseAction.PROMPT].
|
||||||
///
|
///
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_i
|
||||||
|
|
||||||
import '../in_app_webview/webview.dart';
|
import '../in_app_webview/webview.dart';
|
||||||
|
|
||||||
|
import '../util.dart';
|
||||||
import 'client_cert_response_action.dart';
|
import 'client_cert_response_action.dart';
|
||||||
|
|
||||||
part 'client_cert_response.g.dart';
|
part 'client_cert_response.g.dart';
|
||||||
|
@ -40,7 +41,6 @@ class ClientCertResponse_ {
|
||||||
|
|
||||||
this.keyStoreType = this.keyStoreType ?? this.androidKeyStoreType;
|
this.keyStoreType = this.keyStoreType ?? this.androidKeyStoreType;
|
||||||
|
|
||||||
if (!kIsWeb && defaultTargetPlatform == TargetPlatform.android)
|
if (Util.isAndroid) assert(this.keyStoreType != null);
|
||||||
assert(this.keyStoreType != null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,8 +36,7 @@ class ClientCertResponse {
|
||||||
if (this.action == ClientCertResponseAction.PROCEED)
|
if (this.action == ClientCertResponseAction.PROCEED)
|
||||||
assert(certificatePath.isNotEmpty);
|
assert(certificatePath.isNotEmpty);
|
||||||
this.keyStoreType = this.keyStoreType ?? this.androidKeyStoreType;
|
this.keyStoreType = this.keyStoreType ?? this.androidKeyStoreType;
|
||||||
if (!kIsWeb && defaultTargetPlatform == TargetPlatform.android)
|
if (Util.isAndroid) assert(this.keyStoreType != null);
|
||||||
assert(this.keyStoreType != null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///Gets a possible [ClientCertResponse] instance from a [Map] value.
|
///Gets a possible [ClientCertResponse] instance from a [Map] value.
|
||||||
|
|
|
@ -30,6 +30,10 @@ class CreateWindowAction_ extends NavigationAction_ {
|
||||||
///Window features requested by the webpage.
|
///Window features requested by the webpage.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "WKWindowFeatures",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/webkit/wkwindowfeatures"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "WKWindowFeatures",
|
apiName: "WKWindowFeatures",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/webkit/wkwindowfeatures")
|
"https://developer.apple.com/documentation/webkit/wkwindowfeatures")
|
||||||
|
|
|
@ -29,6 +29,7 @@ class CreateWindowAction extends NavigationAction {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKWindowFeatures](https://developer.apple.com/documentation/webkit/wkwindowfeatures))
|
///- iOS ([Official API - WKWindowFeatures](https://developer.apple.com/documentation/webkit/wkwindowfeatures))
|
||||||
|
///- MacOS ([Official API - WKWindowFeatures](https://developer.apple.com/documentation/webkit/wkwindowfeatures))
|
||||||
WindowFeatures? windowFeatures;
|
WindowFeatures? windowFeatures;
|
||||||
CreateWindowAction(
|
CreateWindowAction(
|
||||||
{required this.windowId,
|
{required this.windowId,
|
||||||
|
|
|
@ -19,7 +19,7 @@ class JsAlertRequest_ {
|
||||||
bool? iosIsMainFrame;
|
bool? iosIsMainFrame;
|
||||||
|
|
||||||
///Indicates whether the request was made for the main frame.
|
///Indicates whether the request was made for the main frame.
|
||||||
@SupportedPlatforms(platforms: [IOSPlatform()])
|
@SupportedPlatforms(platforms: [IOSPlatform(), MacOSPlatform()])
|
||||||
bool? isMainFrame;
|
bool? isMainFrame;
|
||||||
|
|
||||||
JsAlertRequest_(
|
JsAlertRequest_(
|
||||||
|
|
|
@ -22,6 +22,7 @@ class JsAlertRequest {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///- MacOS
|
||||||
bool? isMainFrame;
|
bool? isMainFrame;
|
||||||
JsAlertRequest(
|
JsAlertRequest(
|
||||||
{this.url,
|
{this.url,
|
||||||
|
|
|
@ -19,7 +19,7 @@ class JsConfirmRequest_ {
|
||||||
bool? iosIsMainFrame;
|
bool? iosIsMainFrame;
|
||||||
|
|
||||||
///Indicates whether the request was made for the main frame.
|
///Indicates whether the request was made for the main frame.
|
||||||
@SupportedPlatforms(platforms: [IOSPlatform()])
|
@SupportedPlatforms(platforms: [IOSPlatform(), MacOSPlatform()])
|
||||||
bool? isMainFrame;
|
bool? isMainFrame;
|
||||||
|
|
||||||
JsConfirmRequest_(
|
JsConfirmRequest_(
|
||||||
|
|
|
@ -22,6 +22,7 @@ class JsConfirmRequest {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///- MacOS
|
||||||
bool? isMainFrame;
|
bool? isMainFrame;
|
||||||
JsConfirmRequest(
|
JsConfirmRequest(
|
||||||
{this.url,
|
{this.url,
|
||||||
|
|
|
@ -22,7 +22,7 @@ class JsPromptRequest_ {
|
||||||
bool? iosIsMainFrame;
|
bool? iosIsMainFrame;
|
||||||
|
|
||||||
///Indicates whether the request was made for the main frame.
|
///Indicates whether the request was made for the main frame.
|
||||||
@SupportedPlatforms(platforms: [IOSPlatform()])
|
@SupportedPlatforms(platforms: [IOSPlatform(), MacOSPlatform()])
|
||||||
bool? isMainFrame;
|
bool? isMainFrame;
|
||||||
|
|
||||||
JsPromptRequest_(
|
JsPromptRequest_(
|
||||||
|
|
|
@ -25,6 +25,7 @@ class JsPromptRequest {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///- MacOS
|
||||||
bool? isMainFrame;
|
bool? isMainFrame;
|
||||||
JsPromptRequest(
|
JsPromptRequest(
|
||||||
{this.url,
|
{this.url,
|
||||||
|
|
|
@ -66,6 +66,10 @@ class NavigationAction_ {
|
||||||
///The type of action triggering the navigation.ì
|
///The type of action triggering the navigation.ì
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "WKNavigationAction.navigationType",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/webkit/wknavigationaction/1401914-navigationtype"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "WKNavigationAction.navigationType",
|
apiName: "WKNavigationAction.navigationType",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/webkit/wknavigationaction/1401914-navigationtype")
|
"https://developer.apple.com/documentation/webkit/wknavigationaction/1401914-navigationtype")
|
||||||
|
@ -79,6 +83,10 @@ class NavigationAction_ {
|
||||||
///The frame that requested the navigation.
|
///The frame that requested the navigation.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "WKNavigationAction.sourceFrame",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/webkit/wknavigationaction/1401926-sourceframe"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "WKNavigationAction.sourceFrame",
|
apiName: "WKNavigationAction.sourceFrame",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/webkit/wknavigationaction/1401926-sourceframe")
|
"https://developer.apple.com/documentation/webkit/wknavigationaction/1401926-sourceframe")
|
||||||
|
@ -92,6 +100,10 @@ class NavigationAction_ {
|
||||||
///The frame in which to display the new content.
|
///The frame in which to display the new content.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "WKNavigationAction.targetFrame",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/webkit/wknavigationaction/1401918-targetframe"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "WKNavigationAction.targetFrame",
|
apiName: "WKNavigationAction.targetFrame",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/webkit/wknavigationaction/1401918-targetframe")
|
"https://developer.apple.com/documentation/webkit/wknavigationaction/1401918-targetframe")
|
||||||
|
@ -103,6 +115,11 @@ class NavigationAction_ {
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
available: "14.5",
|
available: "14.5",
|
||||||
apiName: "WKNavigationAction.shouldPerformDownload",
|
apiName: "WKNavigationAction.shouldPerformDownload",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/webkit/wknavigationaction/3727357-shouldperformdownload"),
|
||||||
|
MacOSPlatform(
|
||||||
|
available: "11.3",
|
||||||
|
apiName: "WKNavigationAction.shouldPerformDownload",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/webkit/wknavigationaction/3727357-shouldperformdownload")
|
"https://developer.apple.com/documentation/webkit/wknavigationaction/3727357-shouldperformdownload")
|
||||||
])
|
])
|
||||||
|
|
|
@ -58,6 +58,7 @@ class NavigationAction {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKNavigationAction.navigationType](https://developer.apple.com/documentation/webkit/wknavigationaction/1401914-navigationtype))
|
///- iOS ([Official API - WKNavigationAction.navigationType](https://developer.apple.com/documentation/webkit/wknavigationaction/1401914-navigationtype))
|
||||||
|
///- MacOS ([Official API - WKNavigationAction.navigationType](https://developer.apple.com/documentation/webkit/wknavigationaction/1401914-navigationtype))
|
||||||
NavigationType? navigationType;
|
NavigationType? navigationType;
|
||||||
|
|
||||||
///Use [sourceFrame] instead.
|
///Use [sourceFrame] instead.
|
||||||
|
@ -68,6 +69,7 @@ class NavigationAction {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKNavigationAction.sourceFrame](https://developer.apple.com/documentation/webkit/wknavigationaction/1401926-sourceframe))
|
///- iOS ([Official API - WKNavigationAction.sourceFrame](https://developer.apple.com/documentation/webkit/wknavigationaction/1401926-sourceframe))
|
||||||
|
///- MacOS ([Official API - WKNavigationAction.sourceFrame](https://developer.apple.com/documentation/webkit/wknavigationaction/1401926-sourceframe))
|
||||||
FrameInfo? sourceFrame;
|
FrameInfo? sourceFrame;
|
||||||
|
|
||||||
///Use [targetFrame] instead.
|
///Use [targetFrame] instead.
|
||||||
|
@ -78,12 +80,14 @@ class NavigationAction {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKNavigationAction.targetFrame](https://developer.apple.com/documentation/webkit/wknavigationaction/1401918-targetframe))
|
///- iOS ([Official API - WKNavigationAction.targetFrame](https://developer.apple.com/documentation/webkit/wknavigationaction/1401918-targetframe))
|
||||||
|
///- MacOS ([Official API - WKNavigationAction.targetFrame](https://developer.apple.com/documentation/webkit/wknavigationaction/1401918-targetframe))
|
||||||
FrameInfo? targetFrame;
|
FrameInfo? targetFrame;
|
||||||
|
|
||||||
///A value indicating whether the web content used a download attribute to indicate that this should be downloaded.
|
///A value indicating whether the web content used a download attribute to indicate that this should be downloaded.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS 14.5+ ([Official API - WKNavigationAction.shouldPerformDownload](https://developer.apple.com/documentation/webkit/wknavigationaction/3727357-shouldperformdownload))
|
///- iOS 14.5+ ([Official API - WKNavigationAction.shouldPerformDownload](https://developer.apple.com/documentation/webkit/wknavigationaction/3727357-shouldperformdownload))
|
||||||
|
///- MacOS 11.3+ ([Official API - WKNavigationAction.shouldPerformDownload](https://developer.apple.com/documentation/webkit/wknavigationaction/3727357-shouldperformdownload))
|
||||||
bool? shouldPerformDownload;
|
bool? shouldPerformDownload;
|
||||||
NavigationAction(
|
NavigationAction(
|
||||||
{required this.request,
|
{required this.request,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';
|
||||||
|
|
||||||
|
import '../util.dart';
|
||||||
import '../x509_certificate/x509_certificate.dart';
|
import '../x509_certificate/x509_certificate.dart';
|
||||||
import '../x509_certificate/asn1_distinguished_names.dart';
|
import '../x509_certificate/asn1_distinguished_names.dart';
|
||||||
|
|
||||||
|
@ -47,7 +48,7 @@ class SslCertificate_ {
|
||||||
print(stacktrace);
|
print(stacktrace);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defaultTargetPlatform == TargetPlatform.iOS) {
|
if (Util.isIOS) {
|
||||||
if (x509Certificate != null) {
|
if (x509Certificate != null) {
|
||||||
return SslCertificate(
|
return SslCertificate(
|
||||||
issuedBy: SslCertificateDName(
|
issuedBy: SslCertificateDName(
|
||||||
|
|
|
@ -41,7 +41,7 @@ class SslCertificate {
|
||||||
print(e);
|
print(e);
|
||||||
print(stacktrace);
|
print(stacktrace);
|
||||||
}
|
}
|
||||||
if (defaultTargetPlatform == TargetPlatform.iOS) {
|
if (Util.isIOS) {
|
||||||
if (x509Certificate != null) {
|
if (x509Certificate != null) {
|
||||||
return SslCertificate(
|
return SslCertificate(
|
||||||
issuedBy: SslCertificateDName(
|
issuedBy: SslCertificateDName(
|
||||||
|
|
|
@ -40,7 +40,7 @@ class URLCredential_ {
|
||||||
|
|
||||||
///The intermediate certificates of the credential, if it is a client certificate credential.
|
///The intermediate certificates of the credential, if it is a client certificate credential.
|
||||||
@ExchangeableObjectProperty(deserializer: _certificatesDeserializer)
|
@ExchangeableObjectProperty(deserializer: _certificatesDeserializer)
|
||||||
@SupportedPlatforms(platforms: [IOSPlatform()])
|
@SupportedPlatforms(platforms: [IOSPlatform(), MacOSPlatform()])
|
||||||
List<X509Certificate>? certificates;
|
List<X509Certificate>? certificates;
|
||||||
|
|
||||||
///Use [persistence] instead.
|
///Use [persistence] instead.
|
||||||
|
@ -48,7 +48,7 @@ class URLCredential_ {
|
||||||
IOSURLCredentialPersistence_? iosPersistence;
|
IOSURLCredentialPersistence_? iosPersistence;
|
||||||
|
|
||||||
///The credential’s persistence setting.
|
///The credential’s persistence setting.
|
||||||
@SupportedPlatforms(platforms: [IOSPlatform()])
|
@SupportedPlatforms(platforms: [IOSPlatform(), MacOSPlatform()])
|
||||||
URLCredentialPersistence_? persistence;
|
URLCredentialPersistence_? persistence;
|
||||||
|
|
||||||
URLCredential_(
|
URLCredential_(
|
||||||
|
|
|
@ -23,6 +23,7 @@ class URLCredential {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///- MacOS
|
||||||
List<X509Certificate>? certificates;
|
List<X509Certificate>? certificates;
|
||||||
|
|
||||||
///Use [persistence] instead.
|
///Use [persistence] instead.
|
||||||
|
@ -33,6 +34,7 @@ class URLCredential {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS
|
///- iOS
|
||||||
|
///- MacOS
|
||||||
URLCredentialPersistence? persistence;
|
URLCredentialPersistence? persistence;
|
||||||
URLCredential(
|
URLCredential(
|
||||||
{this.username,
|
{this.username,
|
||||||
|
|
|
@ -56,6 +56,10 @@ class URLProtectionSpace_ {
|
||||||
///The authentication method used by the receiver.
|
///The authentication method used by the receiver.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "URLProtectionSpace.authenticationMethod",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlprotectionspace/1415028-authenticationmethod"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "URLProtectionSpace.authenticationMethod",
|
apiName: "URLProtectionSpace.authenticationMethod",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlprotectionspace/1415028-authenticationmethod")
|
"https://developer.apple.com/documentation/foundation/urlprotectionspace/1415028-authenticationmethod")
|
||||||
|
@ -73,6 +77,10 @@ class URLProtectionSpace_ {
|
||||||
@ExchangeableObjectProperty(deserializer: _distinguishedNamesDeserializer)
|
@ExchangeableObjectProperty(deserializer: _distinguishedNamesDeserializer)
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "URLProtectionSpace.distinguishedNames",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlprotectionspace/1417061-distinguishednames"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "URLProtectionSpace.distinguishedNames",
|
apiName: "URLProtectionSpace.distinguishedNames",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlprotectionspace/1417061-distinguishednames")
|
"https://developer.apple.com/documentation/foundation/urlprotectionspace/1417061-distinguishednames")
|
||||||
|
@ -87,6 +95,10 @@ class URLProtectionSpace_ {
|
||||||
///This value is `true` if the credentials for the protection space represented by the receiver can be sent securely, `false` otherwise.
|
///This value is `true` if the credentials for the protection space represented by the receiver can be sent securely, `false` otherwise.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "URLProtectionSpace.receivesCredentialSecurely",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlprotectionspace/1415176-receivescredentialsecurely"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "URLProtectionSpace.receivesCredentialSecurely",
|
apiName: "URLProtectionSpace.receivesCredentialSecurely",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlprotectionspace/1415176-receivescredentialsecurely")
|
"https://developer.apple.com/documentation/foundation/urlprotectionspace/1415176-receivescredentialsecurely")
|
||||||
|
@ -102,6 +114,10 @@ class URLProtectionSpace_ {
|
||||||
///The supported proxy types are listed in [URLProtectionSpaceProxyType.values].
|
///The supported proxy types are listed in [URLProtectionSpaceProxyType.values].
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "URLProtectionSpace.proxyType",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlprotectionspace/1411924-proxytype"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "URLProtectionSpace.proxyType",
|
apiName: "URLProtectionSpace.proxyType",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlprotectionspace/1411924-proxytype")
|
"https://developer.apple.com/documentation/foundation/urlprotectionspace/1411924-proxytype")
|
||||||
|
|
|
@ -36,6 +36,7 @@ class URLProtectionSpace {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLProtectionSpace.authenticationMethod](https://developer.apple.com/documentation/foundation/urlprotectionspace/1415028-authenticationmethod))
|
///- iOS ([Official API - URLProtectionSpace.authenticationMethod](https://developer.apple.com/documentation/foundation/urlprotectionspace/1415028-authenticationmethod))
|
||||||
|
///- MacOS ([Official API - URLProtectionSpace.authenticationMethod](https://developer.apple.com/documentation/foundation/urlprotectionspace/1415028-authenticationmethod))
|
||||||
URLProtectionSpaceAuthenticationMethod? authenticationMethod;
|
URLProtectionSpaceAuthenticationMethod? authenticationMethod;
|
||||||
|
|
||||||
///Use [distinguishedNames] instead.
|
///Use [distinguishedNames] instead.
|
||||||
|
@ -48,6 +49,7 @@ class URLProtectionSpace {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLProtectionSpace.distinguishedNames](https://developer.apple.com/documentation/foundation/urlprotectionspace/1417061-distinguishednames))
|
///- iOS ([Official API - URLProtectionSpace.distinguishedNames](https://developer.apple.com/documentation/foundation/urlprotectionspace/1417061-distinguishednames))
|
||||||
|
///- MacOS ([Official API - URLProtectionSpace.distinguishedNames](https://developer.apple.com/documentation/foundation/urlprotectionspace/1417061-distinguishednames))
|
||||||
List<X509Certificate>? distinguishedNames;
|
List<X509Certificate>? distinguishedNames;
|
||||||
|
|
||||||
///Use [receivesCredentialSecurely] instead.
|
///Use [receivesCredentialSecurely] instead.
|
||||||
|
@ -59,6 +61,7 @@ class URLProtectionSpace {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLProtectionSpace.receivesCredentialSecurely](https://developer.apple.com/documentation/foundation/urlprotectionspace/1415176-receivescredentialsecurely))
|
///- iOS ([Official API - URLProtectionSpace.receivesCredentialSecurely](https://developer.apple.com/documentation/foundation/urlprotectionspace/1415176-receivescredentialsecurely))
|
||||||
|
///- MacOS ([Official API - URLProtectionSpace.receivesCredentialSecurely](https://developer.apple.com/documentation/foundation/urlprotectionspace/1415176-receivescredentialsecurely))
|
||||||
bool? receivesCredentialSecurely;
|
bool? receivesCredentialSecurely;
|
||||||
|
|
||||||
///Use [proxyType] instead.
|
///Use [proxyType] instead.
|
||||||
|
@ -71,6 +74,7 @@ class URLProtectionSpace {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLProtectionSpace.proxyType](https://developer.apple.com/documentation/foundation/urlprotectionspace/1411924-proxytype))
|
///- iOS ([Official API - URLProtectionSpace.proxyType](https://developer.apple.com/documentation/foundation/urlprotectionspace/1411924-proxytype))
|
||||||
|
///- MacOS ([Official API - URLProtectionSpace.proxyType](https://developer.apple.com/documentation/foundation/urlprotectionspace/1411924-proxytype))
|
||||||
URLProtectionSpaceProxyType? proxyType;
|
URLProtectionSpaceProxyType? proxyType;
|
||||||
URLProtectionSpace(
|
URLProtectionSpace(
|
||||||
{required this.host,
|
{required this.host,
|
||||||
|
|
|
@ -32,6 +32,10 @@ class URLRequest_ {
|
||||||
///A Boolean value indicating whether the request is allowed to use the built-in cellular radios to satisfy the request.
|
///A Boolean value indicating whether the request is allowed to use the built-in cellular radios to satisfy the request.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "URLRequest.allowsCellularAccess",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlrequest/2011607-allowscellularaccess/"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "URLRequest.allowsCellularAccess",
|
apiName: "URLRequest.allowsCellularAccess",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlrequest/2011607-allowscellularaccess/")
|
"https://developer.apple.com/documentation/foundation/urlrequest/2011607-allowscellularaccess/")
|
||||||
|
@ -47,6 +51,11 @@ class URLRequest_ {
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
available: "13.0",
|
available: "13.0",
|
||||||
apiName: "URLRequest.allowsConstrainedNetworkAccess",
|
apiName: "URLRequest.allowsConstrainedNetworkAccess",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlrequest/3358304-allowsconstrainednetworkaccess"),
|
||||||
|
MacOSPlatform(
|
||||||
|
available: "10.15",
|
||||||
|
apiName: "URLRequest.allowsConstrainedNetworkAccess",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlrequest/3358304-allowsconstrainednetworkaccess")
|
"https://developer.apple.com/documentation/foundation/urlrequest/3358304-allowsconstrainednetworkaccess")
|
||||||
])
|
])
|
||||||
|
@ -61,6 +70,11 @@ class URLRequest_ {
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
available: "13.0",
|
available: "13.0",
|
||||||
apiName: "URLRequest.allowsExpensiveNetworkAccess",
|
apiName: "URLRequest.allowsExpensiveNetworkAccess",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlrequest/3358305-allowsexpensivenetworkaccess"),
|
||||||
|
MacOSPlatform(
|
||||||
|
available: "10.15",
|
||||||
|
apiName: "URLRequest.allowsExpensiveNetworkAccess",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlrequest/3358305-allowsexpensivenetworkaccess")
|
"https://developer.apple.com/documentation/foundation/urlrequest/3358305-allowsexpensivenetworkaccess")
|
||||||
])
|
])
|
||||||
|
@ -73,6 +87,10 @@ class URLRequest_ {
|
||||||
///The request’s cache policy.
|
///The request’s cache policy.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "URLRequest.cachePolicy",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlrequest/2011593-cachepolicy"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "URLRequest.cachePolicy",
|
apiName: "URLRequest.cachePolicy",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlrequest/2011593-cachepolicy")
|
"https://developer.apple.com/documentation/foundation/urlrequest/2011593-cachepolicy")
|
||||||
|
@ -86,6 +104,10 @@ class URLRequest_ {
|
||||||
///A Boolean value indicating whether cookies will be sent with and set for this request.
|
///A Boolean value indicating whether cookies will be sent with and set for this request.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "URLRequest.httpShouldHandleCookies",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlrequest/2011548-httpshouldhandlecookies"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "URLRequest.httpShouldHandleCookies",
|
apiName: "URLRequest.httpShouldHandleCookies",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlrequest/2011548-httpshouldhandlecookies")
|
"https://developer.apple.com/documentation/foundation/urlrequest/2011548-httpshouldhandlecookies")
|
||||||
|
@ -99,6 +121,10 @@ class URLRequest_ {
|
||||||
///A Boolean value indicating whether the request should transmit before the previous response is received.
|
///A Boolean value indicating whether the request should transmit before the previous response is received.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "URLRequest.httpShouldUsePipelining",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlrequest/2011508-httpshouldusepipelining"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "URLRequest.httpShouldUsePipelining",
|
apiName: "URLRequest.httpShouldUsePipelining",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlrequest/2011508-httpshouldusepipelining")
|
"https://developer.apple.com/documentation/foundation/urlrequest/2011508-httpshouldusepipelining")
|
||||||
|
@ -112,6 +138,10 @@ class URLRequest_ {
|
||||||
///The service type associated with this request.
|
///The service type associated with this request.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "URLRequest.networkServiceType",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlrequest/2011409-networkservicetype"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "URLRequest.networkServiceType",
|
apiName: "URLRequest.networkServiceType",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlrequest/2011409-networkservicetype")
|
"https://developer.apple.com/documentation/foundation/urlrequest/2011409-networkservicetype")
|
||||||
|
@ -125,6 +155,10 @@ class URLRequest_ {
|
||||||
///The timeout interval of the request.
|
///The timeout interval of the request.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "URLRequest.timeoutInterval",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlrequest/2011509-timeoutinterval"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "URLRequest.timeoutInterval",
|
apiName: "URLRequest.timeoutInterval",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlrequest/2011509-timeoutinterval")
|
"https://developer.apple.com/documentation/foundation/urlrequest/2011509-timeoutinterval")
|
||||||
|
@ -139,6 +173,10 @@ class URLRequest_ {
|
||||||
///This URL is used for the cookie “same domain as main document” policy.
|
///This URL is used for the cookie “same domain as main document” policy.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
|
apiName: "URLRequest.mainDocumentURL",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlrequest/2011552-maindocumenturl"),
|
||||||
|
MacOSPlatform(
|
||||||
apiName: "URLRequest.mainDocumentURL",
|
apiName: "URLRequest.mainDocumentURL",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlrequest/2011552-maindocumenturl")
|
"https://developer.apple.com/documentation/foundation/urlrequest/2011552-maindocumenturl")
|
||||||
|
@ -152,6 +190,11 @@ class URLRequest_ {
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
available: "14.5",
|
available: "14.5",
|
||||||
apiName: "URLRequest.assumesHTTP3Capable",
|
apiName: "URLRequest.assumesHTTP3Capable",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlrequest/3738175-assumeshttp3capable"),
|
||||||
|
MacOSPlatform(
|
||||||
|
available: "11.3",
|
||||||
|
apiName: "URLRequest.assumesHTTP3Capable",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlrequest/3738175-assumeshttp3capable")
|
"https://developer.apple.com/documentation/foundation/urlrequest/3738175-assumeshttp3capable")
|
||||||
])
|
])
|
||||||
|
@ -164,6 +207,11 @@ class URLRequest_ {
|
||||||
IOSPlatform(
|
IOSPlatform(
|
||||||
available: "15.0",
|
available: "15.0",
|
||||||
apiName: "URLRequest.attribution",
|
apiName: "URLRequest.attribution",
|
||||||
|
apiUrl:
|
||||||
|
"https://developer.apple.com/documentation/foundation/urlrequest/3767318-attribution"),
|
||||||
|
MacOSPlatform(
|
||||||
|
available: "12.0",
|
||||||
|
apiName: "URLRequest.attribution",
|
||||||
apiUrl:
|
apiUrl:
|
||||||
"https://developer.apple.com/documentation/foundation/urlrequest/3767318-attribution")
|
"https://developer.apple.com/documentation/foundation/urlrequest/3767318-attribution")
|
||||||
])
|
])
|
||||||
|
|
|
@ -30,6 +30,7 @@ class URLRequest {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLRequest.allowsCellularAccess](https://developer.apple.com/documentation/foundation/urlrequest/2011607-allowscellularaccess/))
|
///- iOS ([Official API - URLRequest.allowsCellularAccess](https://developer.apple.com/documentation/foundation/urlrequest/2011607-allowscellularaccess/))
|
||||||
|
///- MacOS ([Official API - URLRequest.allowsCellularAccess](https://developer.apple.com/documentation/foundation/urlrequest/2011607-allowscellularaccess/))
|
||||||
bool? allowsCellularAccess;
|
bool? allowsCellularAccess;
|
||||||
|
|
||||||
///Use [allowsConstrainedNetworkAccess] instead.
|
///Use [allowsConstrainedNetworkAccess] instead.
|
||||||
|
@ -40,6 +41,7 @@ class URLRequest {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS 13.0+ ([Official API - URLRequest.allowsConstrainedNetworkAccess](https://developer.apple.com/documentation/foundation/urlrequest/3358304-allowsconstrainednetworkaccess))
|
///- iOS 13.0+ ([Official API - URLRequest.allowsConstrainedNetworkAccess](https://developer.apple.com/documentation/foundation/urlrequest/3358304-allowsconstrainednetworkaccess))
|
||||||
|
///- MacOS 10.15+ ([Official API - URLRequest.allowsConstrainedNetworkAccess](https://developer.apple.com/documentation/foundation/urlrequest/3358304-allowsconstrainednetworkaccess))
|
||||||
bool? allowsConstrainedNetworkAccess;
|
bool? allowsConstrainedNetworkAccess;
|
||||||
|
|
||||||
///Use [allowsExpensiveNetworkAccess] instead.
|
///Use [allowsExpensiveNetworkAccess] instead.
|
||||||
|
@ -50,6 +52,7 @@ class URLRequest {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS 13.0+ ([Official API - URLRequest.allowsExpensiveNetworkAccess](https://developer.apple.com/documentation/foundation/urlrequest/3358305-allowsexpensivenetworkaccess))
|
///- iOS 13.0+ ([Official API - URLRequest.allowsExpensiveNetworkAccess](https://developer.apple.com/documentation/foundation/urlrequest/3358305-allowsexpensivenetworkaccess))
|
||||||
|
///- MacOS 10.15+ ([Official API - URLRequest.allowsExpensiveNetworkAccess](https://developer.apple.com/documentation/foundation/urlrequest/3358305-allowsexpensivenetworkaccess))
|
||||||
bool? allowsExpensiveNetworkAccess;
|
bool? allowsExpensiveNetworkAccess;
|
||||||
|
|
||||||
///Use [cachePolicy] instead.
|
///Use [cachePolicy] instead.
|
||||||
|
@ -60,6 +63,7 @@ class URLRequest {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLRequest.cachePolicy](https://developer.apple.com/documentation/foundation/urlrequest/2011593-cachepolicy))
|
///- iOS ([Official API - URLRequest.cachePolicy](https://developer.apple.com/documentation/foundation/urlrequest/2011593-cachepolicy))
|
||||||
|
///- MacOS ([Official API - URLRequest.cachePolicy](https://developer.apple.com/documentation/foundation/urlrequest/2011593-cachepolicy))
|
||||||
URLRequestCachePolicy? cachePolicy;
|
URLRequestCachePolicy? cachePolicy;
|
||||||
|
|
||||||
///Use [httpShouldHandleCookies] instead.
|
///Use [httpShouldHandleCookies] instead.
|
||||||
|
@ -70,6 +74,7 @@ class URLRequest {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLRequest.httpShouldHandleCookies](https://developer.apple.com/documentation/foundation/urlrequest/2011548-httpshouldhandlecookies))
|
///- iOS ([Official API - URLRequest.httpShouldHandleCookies](https://developer.apple.com/documentation/foundation/urlrequest/2011548-httpshouldhandlecookies))
|
||||||
|
///- MacOS ([Official API - URLRequest.httpShouldHandleCookies](https://developer.apple.com/documentation/foundation/urlrequest/2011548-httpshouldhandlecookies))
|
||||||
bool? httpShouldHandleCookies;
|
bool? httpShouldHandleCookies;
|
||||||
|
|
||||||
///Use [httpShouldUsePipelining] instead.
|
///Use [httpShouldUsePipelining] instead.
|
||||||
|
@ -80,6 +85,7 @@ class URLRequest {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLRequest.httpShouldUsePipelining](https://developer.apple.com/documentation/foundation/urlrequest/2011508-httpshouldusepipelining))
|
///- iOS ([Official API - URLRequest.httpShouldUsePipelining](https://developer.apple.com/documentation/foundation/urlrequest/2011508-httpshouldusepipelining))
|
||||||
|
///- MacOS ([Official API - URLRequest.httpShouldUsePipelining](https://developer.apple.com/documentation/foundation/urlrequest/2011508-httpshouldusepipelining))
|
||||||
bool? httpShouldUsePipelining;
|
bool? httpShouldUsePipelining;
|
||||||
|
|
||||||
///Use [networkServiceType] instead.
|
///Use [networkServiceType] instead.
|
||||||
|
@ -90,6 +96,7 @@ class URLRequest {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLRequest.networkServiceType](https://developer.apple.com/documentation/foundation/urlrequest/2011409-networkservicetype))
|
///- iOS ([Official API - URLRequest.networkServiceType](https://developer.apple.com/documentation/foundation/urlrequest/2011409-networkservicetype))
|
||||||
|
///- MacOS ([Official API - URLRequest.networkServiceType](https://developer.apple.com/documentation/foundation/urlrequest/2011409-networkservicetype))
|
||||||
URLRequestNetworkServiceType? networkServiceType;
|
URLRequestNetworkServiceType? networkServiceType;
|
||||||
|
|
||||||
///Use [timeoutInterval] instead.
|
///Use [timeoutInterval] instead.
|
||||||
|
@ -100,6 +107,7 @@ class URLRequest {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLRequest.timeoutInterval](https://developer.apple.com/documentation/foundation/urlrequest/2011509-timeoutinterval))
|
///- iOS ([Official API - URLRequest.timeoutInterval](https://developer.apple.com/documentation/foundation/urlrequest/2011509-timeoutinterval))
|
||||||
|
///- MacOS ([Official API - URLRequest.timeoutInterval](https://developer.apple.com/documentation/foundation/urlrequest/2011509-timeoutinterval))
|
||||||
double? timeoutInterval;
|
double? timeoutInterval;
|
||||||
|
|
||||||
///Use [mainDocumentURL] instead.
|
///Use [mainDocumentURL] instead.
|
||||||
|
@ -111,6 +119,7 @@ class URLRequest {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLRequest.mainDocumentURL](https://developer.apple.com/documentation/foundation/urlrequest/2011552-maindocumenturl))
|
///- iOS ([Official API - URLRequest.mainDocumentURL](https://developer.apple.com/documentation/foundation/urlrequest/2011552-maindocumenturl))
|
||||||
|
///- MacOS ([Official API - URLRequest.mainDocumentURL](https://developer.apple.com/documentation/foundation/urlrequest/2011552-maindocumenturl))
|
||||||
WebUri? mainDocumentURL;
|
WebUri? mainDocumentURL;
|
||||||
|
|
||||||
///`true` if server endpoint is known to support HTTP/3. Enables QUIC racing
|
///`true` if server endpoint is known to support HTTP/3. Enables QUIC racing
|
||||||
|
@ -119,6 +128,7 @@ class URLRequest {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS 14.5+ ([Official API - URLRequest.assumesHTTP3Capable](https://developer.apple.com/documentation/foundation/urlrequest/3738175-assumeshttp3capable))
|
///- iOS 14.5+ ([Official API - URLRequest.assumesHTTP3Capable](https://developer.apple.com/documentation/foundation/urlrequest/3738175-assumeshttp3capable))
|
||||||
|
///- MacOS 11.3+ ([Official API - URLRequest.assumesHTTP3Capable](https://developer.apple.com/documentation/foundation/urlrequest/3738175-assumeshttp3capable))
|
||||||
bool? assumesHTTP3Capable;
|
bool? assumesHTTP3Capable;
|
||||||
|
|
||||||
///The entities that can make a network request.
|
///The entities that can make a network request.
|
||||||
|
@ -127,6 +137,7 @@ class URLRequest {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS 15.0+ ([Official API - URLRequest.attribution](https://developer.apple.com/documentation/foundation/urlrequest/3767318-attribution))
|
///- iOS 15.0+ ([Official API - URLRequest.attribution](https://developer.apple.com/documentation/foundation/urlrequest/3767318-attribution))
|
||||||
|
///- MacOS 12.0+ ([Official API - URLRequest.attribution](https://developer.apple.com/documentation/foundation/urlrequest/3767318-attribution))
|
||||||
URLRequestAttribution? attribution;
|
URLRequestAttribution? attribution;
|
||||||
URLRequest(
|
URLRequest(
|
||||||
{this.url,
|
{this.url,
|
||||||
|
|
|
@ -459,9 +459,6 @@ class WebResourceErrorType_ {
|
||||||
WebResourceErrorType_._internal("CANNOT_PARSE_RESPONSE");
|
WebResourceErrorType_._internal("CANNOT_PARSE_RESPONSE");
|
||||||
|
|
||||||
///App Transport Security disallowed a connection because there is no secure network connection.
|
///App Transport Security disallowed a connection because there is no secure network connection.
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.appTransportSecurityRequiresSecureConnection](https://developer.apple.com/documentation/foundation/urlerror/code/2882980-apptransportsecurityrequiressecu))
|
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [
|
||||||
EnumIOSPlatform(
|
EnumIOSPlatform(
|
||||||
apiName: 'URLError.appTransportSecurityRequiresSecureConnection',
|
apiName: 'URLError.appTransportSecurityRequiresSecureConnection',
|
||||||
|
@ -575,9 +572,6 @@ class WebResourceErrorType_ {
|
||||||
WebResourceErrorType_._internal("SERVER_CERTIFICATE_UNTRUSTED");
|
WebResourceErrorType_._internal("SERVER_CERTIFICATE_UNTRUSTED");
|
||||||
|
|
||||||
///A server certificate was not signed by any root server.
|
///A server certificate was not signed by any root server.
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.serverCertificateHasUnknownRoot](https://developer.apple.com/documentation/foundation/urlerror/code/2883085-servercertificatehasunknownroot))
|
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [
|
||||||
EnumIOSPlatform(
|
EnumIOSPlatform(
|
||||||
apiName: 'URLError.serverCertificateHasUnknownRoot',
|
apiName: 'URLError.serverCertificateHasUnknownRoot',
|
||||||
|
@ -594,9 +588,6 @@ class WebResourceErrorType_ {
|
||||||
WebResourceErrorType_._internal("SERVER_CERTIFICATE_HAS_UNKNOWN_ROOT");
|
WebResourceErrorType_._internal("SERVER_CERTIFICATE_HAS_UNKNOWN_ROOT");
|
||||||
|
|
||||||
///A server certificate is not yet valid.
|
///A server certificate is not yet valid.
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.serverCertificateNotYetValid](https://developer.apple.com/documentation/foundation/urlerror/code/2882991-servercertificatenotyetvalid))
|
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [
|
||||||
EnumIOSPlatform(
|
EnumIOSPlatform(
|
||||||
apiName: 'URLError.serverCertificateNotYetValid',
|
apiName: 'URLError.serverCertificateNotYetValid',
|
||||||
|
@ -757,9 +748,6 @@ class WebResourceErrorType_ {
|
||||||
WebResourceErrorType_._internal("CANNOT_MOVE_FILE");
|
WebResourceErrorType_._internal("CANNOT_MOVE_FILE");
|
||||||
|
|
||||||
///A download task failed to decode an encoded file during the download.
|
///A download task failed to decode an encoded file during the download.
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.downloadDecodingFailedMidStream](https://developer.apple.com/documentation/foundation/urlerror/code/2883224-downloaddecodingfailedmidstream))
|
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [
|
||||||
EnumIOSPlatform(
|
EnumIOSPlatform(
|
||||||
apiName: 'URLError.downloadDecodingFailedMidStream',
|
apiName: 'URLError.downloadDecodingFailedMidStream',
|
||||||
|
@ -776,9 +764,6 @@ class WebResourceErrorType_ {
|
||||||
WebResourceErrorType_._internal("DOWNLOAD_DECODING_FAILED_MID_STREAM");
|
WebResourceErrorType_._internal("DOWNLOAD_DECODING_FAILED_MID_STREAM");
|
||||||
|
|
||||||
///A download task failed to decode an encoded file after downloading.
|
///A download task failed to decode an encoded file after downloading.
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.downloadDecodingFailedToComplete](https://developer.apple.com/documentation/foundation/urlerror/code/2882936-downloaddecodingfailedtocomplete))
|
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [
|
||||||
EnumIOSPlatform(
|
EnumIOSPlatform(
|
||||||
apiName: 'URLError.downloadDecodingFailedToComplete',
|
apiName: 'URLError.downloadDecodingFailedToComplete',
|
||||||
|
@ -859,9 +844,6 @@ class WebResourceErrorType_ {
|
||||||
WebResourceErrorType_._internal("REQUEST_BODY_STREAM_EXHAUSTED");
|
WebResourceErrorType_._internal("REQUEST_BODY_STREAM_EXHAUSTED");
|
||||||
|
|
||||||
///The shared container identifier of the URL session configuration is needed but has not been set.
|
///The shared container identifier of the URL session configuration is needed but has not been set.
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.backgroundSessionRequiresSharedContainer](https://developer.apple.com/documentation/foundation/urlerror/code/2883169-backgroundsessionrequiressharedc))
|
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [
|
||||||
EnumIOSPlatform(
|
EnumIOSPlatform(
|
||||||
apiName: 'URLError.backgroundSessionRequiresSharedContainer',
|
apiName: 'URLError.backgroundSessionRequiresSharedContainer',
|
||||||
|
@ -879,9 +861,6 @@ class WebResourceErrorType_ {
|
||||||
"BACKGROUND_SESSION_REQUIRES_SHARED_CONTAINER");
|
"BACKGROUND_SESSION_REQUIRES_SHARED_CONTAINER");
|
||||||
|
|
||||||
///An app or app extension attempted to connect to a background session that is already connected to a process.
|
///An app or app extension attempted to connect to a background session that is already connected to a process.
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.backgroundSessionInUseByAnotherProcess](https://developer.apple.com/documentation/foundation/urlerror/code/2882923-backgroundsessioninusebyanotherp))
|
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [
|
||||||
EnumIOSPlatform(
|
EnumIOSPlatform(
|
||||||
apiName: 'URLError.backgroundSessionInUseByAnotherProcess',
|
apiName: 'URLError.backgroundSessionInUseByAnotherProcess',
|
||||||
|
@ -899,9 +878,6 @@ class WebResourceErrorType_ {
|
||||||
"BACKGROUND_SESSION_IN_USE_BY_ANOTHER_PROCESS");
|
"BACKGROUND_SESSION_IN_USE_BY_ANOTHER_PROCESS");
|
||||||
|
|
||||||
///The app is suspended or exits while a background data task is processing.
|
///The app is suspended or exits while a background data task is processing.
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.backgroundSessionWasDisconnected](https://developer.apple.com/documentation/foundation/urlerror/code/2883075-backgroundsessionwasdisconnected))
|
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [
|
||||||
EnumIOSPlatform(
|
EnumIOSPlatform(
|
||||||
apiName: 'URLError.backgroundSessionWasDisconnected',
|
apiName: 'URLError.backgroundSessionWasDisconnected',
|
||||||
|
|
|
@ -534,9 +534,6 @@ class WebResourceErrorType {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLError.appTransportSecurityRequiresSecureConnection](https://developer.apple.com/documentation/foundation/urlerror/code/2882980-apptransportsecurityrequiressecu))
|
///- iOS ([Official API - URLError.appTransportSecurityRequiresSecureConnection](https://developer.apple.com/documentation/foundation/urlerror/code/2882980-apptransportsecurityrequiressecu))
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.appTransportSecurityRequiresSecureConnection](https://developer.apple.com/documentation/foundation/urlerror/code/2882980-apptransportsecurityrequiressecu))
|
|
||||||
///- MacOS ([Official API - URLError.appTransportSecurityRequiresSecureConnection](https://developer.apple.com/documentation/foundation/urlerror/code/2882980-apptransportsecurityrequiressecu))
|
///- MacOS ([Official API - URLError.appTransportSecurityRequiresSecureConnection](https://developer.apple.com/documentation/foundation/urlerror/code/2882980-apptransportsecurityrequiressecu))
|
||||||
static final APP_TRANSPORT_SECURITY_REQUIRES_SECURE_CONNECTION =
|
static final APP_TRANSPORT_SECURITY_REQUIRES_SECURE_CONNECTION =
|
||||||
WebResourceErrorType._internalMultiPlatform(
|
WebResourceErrorType._internalMultiPlatform(
|
||||||
|
@ -669,9 +666,6 @@ class WebResourceErrorType {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLError.serverCertificateHasUnknownRoot](https://developer.apple.com/documentation/foundation/urlerror/code/2883085-servercertificatehasunknownroot))
|
///- iOS ([Official API - URLError.serverCertificateHasUnknownRoot](https://developer.apple.com/documentation/foundation/urlerror/code/2883085-servercertificatehasunknownroot))
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.serverCertificateHasUnknownRoot](https://developer.apple.com/documentation/foundation/urlerror/code/2883085-servercertificatehasunknownroot))
|
|
||||||
///- MacOS ([Official API - URLError.serverCertificateHasUnknownRoot](https://developer.apple.com/documentation/foundation/urlerror/code/2883085-servercertificatehasunknownroot))
|
///- MacOS ([Official API - URLError.serverCertificateHasUnknownRoot](https://developer.apple.com/documentation/foundation/urlerror/code/2883085-servercertificatehasunknownroot))
|
||||||
static final SERVER_CERTIFICATE_HAS_UNKNOWN_ROOT =
|
static final SERVER_CERTIFICATE_HAS_UNKNOWN_ROOT =
|
||||||
WebResourceErrorType._internalMultiPlatform(
|
WebResourceErrorType._internalMultiPlatform(
|
||||||
|
@ -691,9 +685,6 @@ class WebResourceErrorType {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLError.serverCertificateNotYetValid](https://developer.apple.com/documentation/foundation/urlerror/code/2882991-servercertificatenotyetvalid))
|
///- iOS ([Official API - URLError.serverCertificateNotYetValid](https://developer.apple.com/documentation/foundation/urlerror/code/2882991-servercertificatenotyetvalid))
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.serverCertificateNotYetValid](https://developer.apple.com/documentation/foundation/urlerror/code/2882991-servercertificatenotyetvalid))
|
|
||||||
///- MacOS ([Official API - URLError.serverCertificateNotYetValid](https://developer.apple.com/documentation/foundation/urlerror/code/2882991-servercertificatenotyetvalid))
|
///- MacOS ([Official API - URLError.serverCertificateNotYetValid](https://developer.apple.com/documentation/foundation/urlerror/code/2882991-servercertificatenotyetvalid))
|
||||||
static final SERVER_CERTIFICATE_NOT_YET_VALID =
|
static final SERVER_CERTIFICATE_NOT_YET_VALID =
|
||||||
WebResourceErrorType._internalMultiPlatform(
|
WebResourceErrorType._internalMultiPlatform(
|
||||||
|
@ -878,9 +869,6 @@ class WebResourceErrorType {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLError.downloadDecodingFailedMidStream](https://developer.apple.com/documentation/foundation/urlerror/code/2883224-downloaddecodingfailedmidstream))
|
///- iOS ([Official API - URLError.downloadDecodingFailedMidStream](https://developer.apple.com/documentation/foundation/urlerror/code/2883224-downloaddecodingfailedmidstream))
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.downloadDecodingFailedMidStream](https://developer.apple.com/documentation/foundation/urlerror/code/2883224-downloaddecodingfailedmidstream))
|
|
||||||
///- MacOS ([Official API - URLError.downloadDecodingFailedMidStream](https://developer.apple.com/documentation/foundation/urlerror/code/2883224-downloaddecodingfailedmidstream))
|
///- MacOS ([Official API - URLError.downloadDecodingFailedMidStream](https://developer.apple.com/documentation/foundation/urlerror/code/2883224-downloaddecodingfailedmidstream))
|
||||||
static final DOWNLOAD_DECODING_FAILED_MID_STREAM =
|
static final DOWNLOAD_DECODING_FAILED_MID_STREAM =
|
||||||
WebResourceErrorType._internalMultiPlatform(
|
WebResourceErrorType._internalMultiPlatform(
|
||||||
|
@ -900,9 +888,6 @@ class WebResourceErrorType {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLError.downloadDecodingFailedToComplete](https://developer.apple.com/documentation/foundation/urlerror/code/2882936-downloaddecodingfailedtocomplete))
|
///- iOS ([Official API - URLError.downloadDecodingFailedToComplete](https://developer.apple.com/documentation/foundation/urlerror/code/2882936-downloaddecodingfailedtocomplete))
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.downloadDecodingFailedToComplete](https://developer.apple.com/documentation/foundation/urlerror/code/2882936-downloaddecodingfailedtocomplete))
|
|
||||||
///- MacOS ([Official API - URLError.downloadDecodingFailedToComplete](https://developer.apple.com/documentation/foundation/urlerror/code/2882936-downloaddecodingfailedtocomplete))
|
///- MacOS ([Official API - URLError.downloadDecodingFailedToComplete](https://developer.apple.com/documentation/foundation/urlerror/code/2882936-downloaddecodingfailedtocomplete))
|
||||||
static final DOWNLOAD_DECODING_FAILED_TO_COMPLETE =
|
static final DOWNLOAD_DECODING_FAILED_TO_COMPLETE =
|
||||||
WebResourceErrorType._internalMultiPlatform(
|
WebResourceErrorType._internalMultiPlatform(
|
||||||
|
@ -996,9 +981,6 @@ class WebResourceErrorType {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLError.backgroundSessionRequiresSharedContainer](https://developer.apple.com/documentation/foundation/urlerror/code/2883169-backgroundsessionrequiressharedc))
|
///- iOS ([Official API - URLError.backgroundSessionRequiresSharedContainer](https://developer.apple.com/documentation/foundation/urlerror/code/2883169-backgroundsessionrequiressharedc))
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.backgroundSessionRequiresSharedContainer](https://developer.apple.com/documentation/foundation/urlerror/code/2883169-backgroundsessionrequiressharedc))
|
|
||||||
///- MacOS ([Official API - URLError.backgroundSessionRequiresSharedContainer](https://developer.apple.com/documentation/foundation/urlerror/code/2883169-backgroundsessionrequiressharedc))
|
///- MacOS ([Official API - URLError.backgroundSessionRequiresSharedContainer](https://developer.apple.com/documentation/foundation/urlerror/code/2883169-backgroundsessionrequiressharedc))
|
||||||
static final BACKGROUND_SESSION_REQUIRES_SHARED_CONTAINER =
|
static final BACKGROUND_SESSION_REQUIRES_SHARED_CONTAINER =
|
||||||
WebResourceErrorType._internalMultiPlatform(
|
WebResourceErrorType._internalMultiPlatform(
|
||||||
|
@ -1018,9 +1000,6 @@ class WebResourceErrorType {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLError.backgroundSessionInUseByAnotherProcess](https://developer.apple.com/documentation/foundation/urlerror/code/2882923-backgroundsessioninusebyanotherp))
|
///- iOS ([Official API - URLError.backgroundSessionInUseByAnotherProcess](https://developer.apple.com/documentation/foundation/urlerror/code/2882923-backgroundsessioninusebyanotherp))
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.backgroundSessionInUseByAnotherProcess](https://developer.apple.com/documentation/foundation/urlerror/code/2882923-backgroundsessioninusebyanotherp))
|
|
||||||
///- MacOS ([Official API - URLError.backgroundSessionInUseByAnotherProcess](https://developer.apple.com/documentation/foundation/urlerror/code/2882923-backgroundsessioninusebyanotherp))
|
///- MacOS ([Official API - URLError.backgroundSessionInUseByAnotherProcess](https://developer.apple.com/documentation/foundation/urlerror/code/2882923-backgroundsessioninusebyanotherp))
|
||||||
static final BACKGROUND_SESSION_IN_USE_BY_ANOTHER_PROCESS =
|
static final BACKGROUND_SESSION_IN_USE_BY_ANOTHER_PROCESS =
|
||||||
WebResourceErrorType._internalMultiPlatform(
|
WebResourceErrorType._internalMultiPlatform(
|
||||||
|
@ -1040,9 +1019,6 @@ class WebResourceErrorType {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - URLError.backgroundSessionWasDisconnected](https://developer.apple.com/documentation/foundation/urlerror/code/2883075-backgroundsessionwasdisconnected))
|
///- iOS ([Official API - URLError.backgroundSessionWasDisconnected](https://developer.apple.com/documentation/foundation/urlerror/code/2883075-backgroundsessionwasdisconnected))
|
||||||
///
|
|
||||||
///**Supported Platforms/Implementations**:
|
|
||||||
///- iOS ([Official API - URLError.backgroundSessionWasDisconnected](https://developer.apple.com/documentation/foundation/urlerror/code/2883075-backgroundsessionwasdisconnected))
|
|
||||||
///- MacOS ([Official API - URLError.backgroundSessionWasDisconnected](https://developer.apple.com/documentation/foundation/urlerror/code/2883075-backgroundsessionwasdisconnected))
|
///- MacOS ([Official API - URLError.backgroundSessionWasDisconnected](https://developer.apple.com/documentation/foundation/urlerror/code/2883075-backgroundsessionwasdisconnected))
|
||||||
static final BACKGROUND_SESSION_WAS_DISCONNECTED =
|
static final BACKGROUND_SESSION_WAS_DISCONNECTED =
|
||||||
WebResourceErrorType._internalMultiPlatform(
|
WebResourceErrorType._internalMultiPlatform(
|
||||||
|
|
|
@ -7,6 +7,28 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'debug_logging_settings.dart';
|
import 'debug_logging_settings.dart';
|
||||||
|
|
||||||
|
class Util {
|
||||||
|
static bool get isWeb => kIsWeb;
|
||||||
|
|
||||||
|
static bool get isAndroid =>
|
||||||
|
!isWeb && defaultTargetPlatform == TargetPlatform.android;
|
||||||
|
|
||||||
|
static bool get isIOS =>
|
||||||
|
!isWeb && defaultTargetPlatform == TargetPlatform.iOS;
|
||||||
|
|
||||||
|
static bool get isMacOS =>
|
||||||
|
!isWeb && defaultTargetPlatform == TargetPlatform.macOS;
|
||||||
|
|
||||||
|
static bool get isWindows =>
|
||||||
|
!isWeb && defaultTargetPlatform == TargetPlatform.windows;
|
||||||
|
|
||||||
|
static bool get isLinux =>
|
||||||
|
!isWeb && defaultTargetPlatform == TargetPlatform.linux;
|
||||||
|
|
||||||
|
static bool get isFuchsia =>
|
||||||
|
!isWeb && defaultTargetPlatform == TargetPlatform.fuchsia;
|
||||||
|
}
|
||||||
|
|
||||||
class IdGenerator {
|
class IdGenerator {
|
||||||
static int _count = 0;
|
static int _count = 0;
|
||||||
|
|
||||||
|
@ -538,7 +560,7 @@ void debugLog(
|
||||||
}
|
}
|
||||||
var maxLogMessageLength = debugLoggingSettings.maxLogMessageLength;
|
var maxLogMessageLength = debugLoggingSettings.maxLogMessageLength;
|
||||||
String message =
|
String message =
|
||||||
"(${kIsWeb ? 'Web' : defaultTargetPlatform.name}) ${name ?? className}" +
|
"(${Util.isWeb ? 'Web' : defaultTargetPlatform.name}) ${name ?? className}" +
|
||||||
(id != null ? ' ID $id' : '') +
|
(id != null ? ' ID $id' : '') +
|
||||||
' calling "' +
|
' calling "' +
|
||||||
method.toString() +
|
method.toString() +
|
||||||
|
|
|
@ -94,8 +94,7 @@ class WebAuthenticationSession implements Disposable {
|
||||||
this.onComplete,
|
this.onComplete,
|
||||||
WebAuthenticationSessionSettings? initialSettings}) {
|
WebAuthenticationSessionSettings? initialSettings}) {
|
||||||
assert(url.toString().isNotEmpty);
|
assert(url.toString().isNotEmpty);
|
||||||
if (defaultTargetPlatform == TargetPlatform.iOS ||
|
if (Util.isIOS || Util.isMacOS) {
|
||||||
defaultTargetPlatform == TargetPlatform.macOS) {
|
|
||||||
assert(['http', 'https'].contains(url.scheme),
|
assert(['http', 'https'].contains(url.scheme),
|
||||||
'The specified URL has an unsupported scheme. Only HTTP and HTTPS URLs are supported on iOS.');
|
'The specified URL has an unsupported scheme. Only HTTP and HTTPS URLs are supported on iOS.');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: flutter_inappwebview
|
name: flutter_inappwebview
|
||||||
description: A Flutter plugin that allows you to add an inline webview, to use an headless webview, and to open an in-app browser window.
|
description: A Flutter plugin that allows you to add an inline webview, to use an headless webview, and to open an in-app browser window.
|
||||||
version: 6.0.0-beta.18
|
version: 6.0.0-beta.19
|
||||||
homepage: https://inappwebview.dev/
|
homepage: https://inappwebview.dev/
|
||||||
repository: https://github.com/pichillilorenzo/flutter_inappwebview
|
repository: https://github.com/pichillilorenzo/flutter_inappwebview
|
||||||
issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues
|
issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues
|
||||||
|
|
Loading…
Reference in New Issue