[cupertino_http] Migrate to FFIgen 22 (#1986)
diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md
index bbd569a..3e77222 100644
--- a/pkgs/cupertino_http/CHANGELOG.md
+++ b/pkgs/cupertino_http/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 3.1.1-wip
+
+* Update to `package:ffigen` `22.0.0`.
+
## 3.1.0
* Switch to `package:objective_c` `9.5.0` and `package:ffigen` `21.0.0`, fixing
diff --git a/pkgs/cupertino_http/DEVELOPMENT.md b/pkgs/cupertino_http/DEVELOPMENT.md
index 9c473ca..821c4f4 100644
--- a/pkgs/cupertino_http/DEVELOPMENT.md
+++ b/pkgs/cupertino_http/DEVELOPMENT.md
@@ -8,7 +8,8 @@
1. [bindings](lib/src/native_cupertino_bindings.dart) generated by
[ffigen](https://pub.dev/packages/ffigen) to relevant
[Foundation framework](https://developer.apple.com/documentation/foundation)
- functionality. Configured using [`ffigen.yaml`](ffigen.yaml).
+ functionality. Configured using [`tool/ffigen.dart`](tool/ffigen.dart)
+ (`dart run tool/ffigen.dart`).
2. A [native helper library](src/) that fills gaps in the generated bindings.
3. Dart source that provides a high-level interface to the
[Foundation framework](https://developer.apple.com/documentation/foundation)
diff --git a/pkgs/cupertino_http/ffigen.yaml b/pkgs/cupertino_http/ffigen.yaml
deleted file mode 100644
index c8e16a5..0000000
--- a/pkgs/cupertino_http/ffigen.yaml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Run with `dart run ffigen --config ffigen.yaml`.
-name: NativeCupertinoHttp
-description: |
- Bindings for the Foundation URL Loading System and supporting libraries.
-
- Regenerate bindings with `dart run ffigen --config ffigen.yaml`.
-language: 'objc'
-output:
- bindings: 'lib/src/native_cupertino_bindings.dart'
- objc-bindings: 'src/native_cupertino_bindings.m'
-headers:
- entry-points:
- - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLCache.h'
- - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLRequest.h'
- - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h'
- - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURL.h'
- - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSLock.h'
- - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSProgress.h'
- - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLResponse.h'
- - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSHTTPCookieStorage.h'
- - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSOperation.h'
- - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSError.h'
- - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h'
-preamble: |
- // ignore_for_file: always_specify_types
- // ignore_for_file: camel_case_types
- // ignore_for_file: non_constant_identifier_names
- // ignore_for_file: unused_element
- // ignore_for_file: unused_field
- // ignore_for_file: return_of_invalid_type
-exclude-all-by-default: true
-objc-interfaces:
- include:
- - 'NSCondition'
- - 'NSHTTPURLResponse'
- - 'NSMutableURLRequest'
- - 'NSOperationQueue'
- - 'NSURLCache'
- - 'NSURLRequest'
- - 'NSURLResponse'
- - 'NSURLSession'
- - 'NSURLSessionConfiguration'
- - 'NSURLSessionDownloadTask'
- - 'NSURLSessionTask'
- - 'NSURLSessionWebSocketMessage'
- - 'NSURLSessionWebSocketTask'
- member-rename:
- # TODO(brianquinlan): Remove this when
- # https://github.com/dart-lang/native/issues/2419 is fixed.
- 'NSURLResponse':
- 'initWithURL:MIMEType:expectedContentLength:textEncodingName:': 'initWithUrlAndMIMEType'
- 'NSHTTPURLResponse':
- 'initWithURL:statusCode:HTTPVersion:headerFields:': 'initWithURLAndStatusCode'
-objc-protocols:
- include:
- - 'NSURLSessionDataDelegate'
- - 'NSURLSessionDownloadDelegate'
- - 'NSURLSessionWebSocketDelegate'
-comments:
- style: any
- length: full
-enums:
- include:
- - 'NSHTTPCookieAcceptPolicy'
- - 'NSURLRequestCachePolicy'
- - 'NSURLRequestNetworkServiceType'
- - 'NSURLSessionMultipathServiceType'
- - 'NSURLSessionResponseDisposition'
- - 'NSURLSessionTaskState'
- - 'NSURLSessionWebSocketMessageType'
- as-int:
- include:
- - 'NSURLSessionWebSocketCloseCode'
diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart
index 28c3f7e..8e0c522 100644
--- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart
+++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart
@@ -1,19 +1,12 @@
-// ignore_for_file: always_specify_types
-// ignore_for_file: camel_case_types
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: unused_element
-// ignore_for_file: unused_field
-// ignore_for_file: return_of_invalid_type
-
// AUTO GENERATED FILE, DO NOT EDIT.
//
// Generated by `package:ffigen`.
-// ignore_for_file: type=lint, unused_import, deprecated_member_use_from_same_package
+// ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package
import 'dart:ffi' as ffi;
import 'package:objective_c/objective_c.dart' as objc;
import 'package:ffi/ffi.dart' as pkg_ffi;
-const _$objcVersionCheck = objc.ObjCVersionCheck(9, 5);
+const _$objcVersionCheck = objc.ObjCVersionCheck(9, 6);
@ffi.Native<
ffi.Void Function(
ffi.Pointer<objc.ObjCObjectImpl>,
@@ -1255,14 +1248,14 @@
/// init
NSHTTPURLResponse init() {
- final _$$ref$1 = object$.ref;
+ final _$$ref = object$.ref;
objc.checkOsVersionInternal(
'NSHTTPURLResponse.init',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 0, 0)),
);
final $ret = _objc_msgSend_151sglz(
- _$$ref$1.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_init,
);
return NSHTTPURLResponse.fromPointer($ret, retain: false, release: true);
@@ -1291,16 +1284,16 @@
/// @param name the name of the text encoding for the associated data, if applicable, else nil
/// @result The initialized NSURLResponse.
/// @discussion This is the designated initializer for NSURLResponse.
- NSHTTPURLResponse initWithUrlAndMIMEType(
+ NSHTTPURLResponse initWithURL(
objc.NSURL URL, {
objc.NSString? MIMEType,
- required int length,
- objc.NSString? name,
+ required int expectedContentLength,
+ objc.NSString? textEncodingName,
}) {
final _$$ref = object$.ref;
final _$$ref$1 = URL.ref;
final _$$ref$2 = MIMEType?.ref;
- final _$$ref$3 = name?.ref;
+ final _$$ref$3 = textEncodingName?.ref;
objc.checkOsVersionInternal(
'NSHTTPURLResponse.initWithURL:MIMEType:expectedContentLength:textEncodingName:',
iOS: (false, (2, 0, 0)),
@@ -1311,7 +1304,7 @@
_sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_,
_$$ref$1.pointer,
_$$ref$2?.pointer ?? ffi.nullptr,
- length,
+ expectedContentLength,
_$$ref$3?.pointer ?? ffi.nullptr,
);
return NSHTTPURLResponse.fromPointer($ret, retain: false, release: true);
@@ -1326,7 +1319,7 @@
/// @param headerFields A dictionary representing the header keys and values of the server response.
/// @result the instance of the object, or NULL if an error occurred during initialization.
/// @discussion This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases.
- NSHTTPURLResponse? initWithURLAndStatusCode(
+ NSHTTPURLResponse? initWithURL$1(
objc.NSURL url, {
required int statusCode,
objc.NSString? HTTPVersion,
@@ -1969,24 +1962,6 @@
}
/// !
- /// @abstract sets whether a connection created with this request is allowed to use
- /// network interfaces which have been marked as ultra constrained.
- /// @discussion NO if the receiver should not be allowed to use an interface marked as ultra constrained to
- /// satisfy the request, YES otherwise.
- bool get allowsUltraConstrainedNetworkAccess {
- final _$$ref = object$.ref;
- objc.checkOsVersionInternal(
- 'NSMutableURLRequest.allowsUltraConstrainedNetworkAccess',
- iOS: (false, (26, 1, 0)),
- macOS: (false, (26, 1, 0)),
- );
- return _objc_msgSend_91o635(
- _$$ref.pointer,
- _sel_allowsUltraConstrainedNetworkAccess,
- );
- }
-
- /// !
/// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC
/// racing without HTTP/3 service discovery.
/// @result YES if server endpoint is known to support HTTP/3. Defaults to NO.
@@ -2048,14 +2023,14 @@
/// init
NSMutableURLRequest init() {
- final _$$ref$2 = object$.ref;
+ final _$$ref = object$.ref;
objc.checkOsVersionInternal(
'NSMutableURLRequest.init',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 0, 0)),
);
final $ret = _objc_msgSend_151sglz(
- _$$ref$2.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_init,
);
return NSMutableURLRequest.fromPointer($ret, retain: false, release: true);
@@ -2063,12 +2038,12 @@
/// initWithCoder:
NSMutableURLRequest? initWithCoder(objc.NSCoder coder) {
- final _$$ref$2 = object$.ref;
- final _$$ref$3 = coder.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = coder.ref;
final $ret = _objc_msgSend_1sotr3r(
- _$$ref$2.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_initWithCoder_,
- _$$ref$3.pointer,
+ _$$ref$1.pointer,
);
return $ret.address == 0
? null
@@ -2254,25 +2229,6 @@
}
/// !
- /// @abstract sets whether a connection created with this request is allowed to use
- /// network interfaces which have been marked as ultra constrained.
- /// @discussion NO if the receiver should not be allowed to use an interface marked as ultra constrained to
- /// satisfy the request, YES otherwise.
- set allowsUltraConstrainedNetworkAccess$1(bool value) {
- final _$$ref = object$.ref;
- objc.checkOsVersionInternal(
- 'NSMutableURLRequest.setAllowsUltraConstrainedNetworkAccess:',
- iOS: (false, (26, 1, 0)),
- macOS: (false, (26, 1, 0)),
- );
- _objc_msgSend_1s56lr9(
- _$$ref.pointer,
- _sel_setAllowsUltraConstrainedNetworkAccess_,
- value,
- );
- }
-
- /// !
/// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC
/// racing without HTTP/3 service discovery.
/// @result YES if server endpoint is known to support HTTP/3. Defaults to NO.
@@ -2657,14 +2613,14 @@
/// init
NSOperationQueue init() {
- final _$$ref$3 = object$.ref;
+ final _$$ref = object$.ref;
objc.checkOsVersionInternal(
'NSOperationQueue.init',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 0, 0)),
);
final $ret = _objc_msgSend_151sglz(
- _$$ref$3.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_init,
);
return NSOperationQueue.fromPointer($ret, retain: false, release: true);
@@ -3074,14 +3030,14 @@
/// init
NSURLCache init() {
- final _$$ref$4 = object$.ref;
+ final _$$ref = object$.ref;
objc.checkOsVersionInternal(
'NSURLCache.init',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 0, 0)),
);
final $ret = _objc_msgSend_151sglz(
- _$$ref$4.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_init,
);
return NSURLCache.fromPointer($ret, retain: false, release: true);
@@ -3371,7 +3327,7 @@
/// @param URL The URL for the request.
/// @result A newly-created and autoreleased NSURLRequest instance.
static NSURLRequest requestWithURL(objc.NSURL URL) {
- final _$$ref$1 = URL.ref;
+ final _$$ref = URL.ref;
objc.checkOsVersionInternal(
'NSURLRequest.requestWithURL:',
iOS: (false, (2, 0, 0)),
@@ -3380,7 +3336,7 @@
final $ret = _objc_msgSend_1sotr3r(
_class_NSURLRequest,
_sel_requestWithURL_,
- _$$ref$1.pointer,
+ _$$ref.pointer,
);
return NSURLRequest.fromPointer($ret, retain: true, release: true);
}
@@ -3400,7 +3356,7 @@
required NSURLRequestCachePolicy cachePolicy,
required double timeoutInterval,
}) {
- final _$$ref$1 = URL.ref;
+ final _$$ref = URL.ref;
objc.checkOsVersionInternal(
'NSURLRequest.requestWithURL:cachePolicy:timeoutInterval:',
iOS: (false, (2, 0, 0)),
@@ -3409,7 +3365,7 @@
final $ret = _objc_msgSend_1ajs603(
_class_NSURLRequest,
_sel_requestWithURL_cachePolicy_timeoutInterval_,
- _$$ref$1.pointer,
+ _$$ref.pointer,
cachePolicy.value,
timeoutInterval,
);
@@ -3510,24 +3466,6 @@
}
/// !
- /// @abstract returns whether a connection created with this request is allowed to use
- /// network interfaces which have been marked as ultra constrained.
- /// @result YES if the receiver is allowed to use an interface marked as ultra constrained to
- /// satisfy the request, NO otherwise.
- bool get allowsUltraConstrainedNetworkAccess {
- final _$$ref = object$.ref;
- objc.checkOsVersionInternal(
- 'NSURLRequest.allowsUltraConstrainedNetworkAccess',
- iOS: (false, (26, 1, 0)),
- macOS: (false, (26, 1, 0)),
- );
- return _objc_msgSend_91o635(
- _$$ref.pointer,
- _sel_allowsUltraConstrainedNetworkAccess,
- );
- }
-
- /// !
/// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC
/// racing without HTTP/3 service discovery.
/// @result YES if server endpoint is known to support HTTP/3. Defaults to NO.
@@ -3602,14 +3540,14 @@
/// init
NSURLRequest init() {
- final _$$ref$5 = object$.ref;
+ final _$$ref = object$.ref;
objc.checkOsVersionInternal(
'NSURLRequest.init',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 0, 0)),
);
final $ret = _objc_msgSend_151sglz(
- _$$ref$5.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_init,
);
return NSURLRequest.fromPointer($ret, retain: false, release: true);
@@ -3617,12 +3555,12 @@
/// initWithCoder:
NSURLRequest? initWithCoder(objc.NSCoder coder) {
- final _$$ref$4 = object$.ref;
- final _$$ref$5 = coder.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = coder.ref;
final $ret = _objc_msgSend_1sotr3r(
- _$$ref$4.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_initWithCoder_,
- _$$ref$5.pointer,
+ _$$ref$1.pointer,
);
return $ret.address == 0
? null
@@ -3638,17 +3576,17 @@
/// @param URL The URL for the request.
/// @result An initialized NSURLRequest.
NSURLRequest initWithURL(objc.NSURL URL) {
- final _$$ref$2 = object$.ref;
- final _$$ref$3 = URL.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = URL.ref;
objc.checkOsVersionInternal(
'NSURLRequest.initWithURL:',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 2, 0)),
);
final $ret = _objc_msgSend_1sotr3r(
- _$$ref$2.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_initWithURL_,
- _$$ref$3.pointer,
+ _$$ref$1.pointer,
);
return NSURLRequest.fromPointer($ret, retain: false, release: true);
}
@@ -3670,17 +3608,17 @@
required NSURLRequestCachePolicy cachePolicy,
required double timeoutInterval,
}) {
- final _$$ref$2 = object$.ref;
- final _$$ref$3 = URL.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = URL.ref;
objc.checkOsVersionInternal(
'NSURLRequest.initWithURL:cachePolicy:timeoutInterval:',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 2, 0)),
);
final $ret = _objc_msgSend_1ajs603(
- _$$ref$2.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_initWithURL_cachePolicy_timeoutInterval_,
- _$$ref$3.pointer,
+ _$$ref$1.pointer,
cachePolicy.value,
timeoutInterval,
);
@@ -4051,12 +3989,12 @@
/// encodeWithCoder:
void encodeWithCoder(objc.NSCoder coder) {
- final _$$ref$2 = object$.ref;
- final _$$ref$3 = coder.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = coder.ref;
_objc_msgSend_xtuoz7(
- _$$ref$2.pointer,
+ _$$ref.pointer,
_sel_encodeWithCoder_,
- _$$ref$3.pointer,
+ _$$ref$1.pointer,
);
}
@@ -4083,14 +4021,14 @@
/// init
NSURLResponse init() {
- final _$$ref$6 = object$.ref;
+ final _$$ref = object$.ref;
objc.checkOsVersionInternal(
'NSURLResponse.init',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 0, 0)),
);
final $ret = _objc_msgSend_151sglz(
- _$$ref$6.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_init,
);
return NSURLResponse.fromPointer($ret, retain: false, release: true);
@@ -4098,12 +4036,12 @@
/// initWithCoder:
NSURLResponse? initWithCoder(objc.NSCoder coder) {
- final _$$ref$6 = object$.ref;
- final _$$ref$7 = coder.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = coder.ref;
final $ret = _objc_msgSend_1sotr3r(
- _$$ref$6.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_initWithCoder_,
- _$$ref$7.pointer,
+ _$$ref$1.pointer,
);
return $ret.address == 0
? null
@@ -4119,28 +4057,28 @@
/// @param name the name of the text encoding for the associated data, if applicable, else nil
/// @result The initialized NSURLResponse.
/// @discussion This is the designated initializer for NSURLResponse.
- NSURLResponse initWithUrlAndMIMEType(
+ NSURLResponse initWithURL(
objc.NSURL URL, {
objc.NSString? MIMEType,
- required int length,
- objc.NSString? name,
+ required int expectedContentLength,
+ objc.NSString? textEncodingName,
}) {
- final _$$ref$4 = object$.ref;
- final _$$ref$5 = URL.ref;
- final _$$ref$6 = MIMEType?.ref;
- final _$$ref$7 = name?.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = URL.ref;
+ final _$$ref$2 = MIMEType?.ref;
+ final _$$ref$3 = textEncodingName?.ref;
objc.checkOsVersionInternal(
'NSURLResponse.initWithURL:MIMEType:expectedContentLength:textEncodingName:',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 2, 0)),
);
final $ret = _objc_msgSend_l9ppnx(
- _$$ref$4.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_,
- _$$ref$5.pointer,
- _$$ref$6?.pointer ?? ffi.nullptr,
- length,
- _$$ref$7?.pointer ?? ffi.nullptr,
+ _$$ref$1.pointer,
+ _$$ref$2?.pointer ?? ffi.nullptr,
+ expectedContentLength,
+ _$$ref$3?.pointer ?? ffi.nullptr,
);
return NSURLResponse.fromPointer($ret, retain: false, release: true);
}
@@ -4587,14 +4525,14 @@
/// init
NSURLSession init() {
- final _$$ref$7 = object$.ref;
+ final _$$ref = object$.ref;
objc.checkOsVersionInternal(
'NSURLSession.init',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 0, 0)),
);
final $ret = _objc_msgSend_151sglz(
- _$$ref$7.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_init,
);
return NSURLSession.fromPointer($ret, retain: false, release: true);
@@ -5536,20 +5474,6 @@
);
}
- /// allow request to route over ultra constrained networks.
- bool get allowsUltraConstrainedNetworkAccess {
- final _$$ref = object$.ref;
- objc.checkOsVersionInternal(
- 'NSURLSessionConfiguration.allowsUltraConstrainedNetworkAccess',
- iOS: (false, (26, 1, 0)),
- macOS: (false, (26, 1, 0)),
- );
- return _objc_msgSend_91o635(
- _$$ref.pointer,
- _sel_allowsUltraConstrainedNetworkAccess,
- );
- }
-
/// The proxy dictionary, as described by <CFNetwork/CFHTTPStream.h>
objc.NSDictionary? get connectionProxyDictionary {
final _$$ref = object$.ref;
@@ -5620,14 +5544,14 @@
/// init
NSURLSessionConfiguration init() {
- final _$$ref$8 = object$.ref;
+ final _$$ref = object$.ref;
objc.checkOsVersionInternal(
'NSURLSessionConfiguration.init',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 0, 0)),
);
final $ret = _objc_msgSend_151sglz(
- _$$ref$8.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_init,
);
return NSURLSessionConfiguration.fromPointer(
@@ -5775,21 +5699,6 @@
);
}
- /// allow request to route over ultra constrained networks.
- set allowsUltraConstrainedNetworkAccess(bool value) {
- final _$$ref = object$.ref;
- objc.checkOsVersionInternal(
- 'NSURLSessionConfiguration.setAllowsUltraConstrainedNetworkAccess:',
- iOS: (false, (26, 1, 0)),
- macOS: (false, (26, 1, 0)),
- );
- _objc_msgSend_1s56lr9(
- _$$ref.pointer,
- _sel_setAllowsUltraConstrainedNetworkAccess_,
- value,
- );
- }
-
/// The proxy dictionary, as described by <CFNetwork/CFHTTPStream.h>
set connectionProxyDictionary(objc.NSDictionary? value) {
final _$$ref = object$.ref;
@@ -9764,20 +9673,20 @@
/// The last message a session receives. A session will only become
/// invalid because of a systemic error or when it has been
/// explicitly invalidated, in which case the error parameter will be nil.
- void URLSession$5(
+ void URLSession(
NSURLSession session, {
objc.NSError? didBecomeInvalidWithError,
}) {
- final _$$ref$3 = object$.ref;
- final _$$ref$4 = session.ref;
- final _$$ref$5 = didBecomeInvalidWithError?.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = didBecomeInvalidWithError?.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadDelegate.URLSession:didBecomeInvalidWithError:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$3.pointer,
+ _$$ref.pointer,
_sel_URLSession_didBecomeInvalidWithError_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -9786,10 +9695,10 @@
);
}
_objc_msgSend_pfv6jd(
- _$$ref$3.pointer,
+ _$$ref.pointer,
_sel_URLSession_didBecomeInvalidWithError_,
- _$$ref$4.pointer,
- _$$ref$5?.pointer ?? ffi.nullptr,
+ _$$ref$1.pointer,
+ _$$ref$2?.pointer ?? ffi.nullptr,
);
}
@@ -9798,20 +9707,20 @@
///
/// This delegate callback is *NOT* dispatched to the delegate queue. It is
/// invoked synchronously before the task creation method returns.
- void URLSession$6(
+ void URLSession$1(
NSURLSession session, {
required NSURLSessionTask didCreateTask,
}) {
- final _$$ref$3 = object$.ref;
- final _$$ref$4 = session.ref;
- final _$$ref$5 = didCreateTask.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = didCreateTask.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadDelegate.URLSession:didCreateTask:',
iOS: (false, (16, 0, 0)),
macOS: (false, (13, 0, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$3.pointer,
+ _$$ref.pointer,
_sel_URLSession_didCreateTask_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -9820,10 +9729,10 @@
);
}
_objc_msgSend_pfv6jd(
- _$$ref$3.pointer,
+ _$$ref.pointer,
_sel_URLSession_didCreateTask_,
- _$$ref$4.pointer,
- _$$ref$5.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
);
}
@@ -9835,23 +9744,23 @@
/// challenges). If this delegate message is not implemented, the
/// behavior will be to use the default handling, which may involve user
/// interaction.
- void URLSession$7(
+ void URLSession$2(
NSURLSession session, {
required NSURLAuthenticationChallenge didReceiveChallenge,
required objc.ObjCBlock<ffi.Void Function(ffi.Long, NSURLCredential?)>
completionHandler,
}) {
- final _$$ref$4 = object$.ref;
- final _$$ref$5 = session.ref;
- final _$$ref$6 = didReceiveChallenge.ref;
- final _$$ref$7 = completionHandler.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = didReceiveChallenge.ref;
+ final _$$ref$3 = completionHandler.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadDelegate.URLSession:didReceiveChallenge:completionHandler:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$4.pointer,
+ _$$ref.pointer,
_sel_URLSession_didReceiveChallenge_completionHandler_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -9860,11 +9769,11 @@
);
}
_objc_msgSend_18qun1e(
- _$$ref$4.pointer,
+ _$$ref.pointer,
_sel_URLSession_didReceiveChallenge_completionHandler_,
- _$$ref$5.pointer,
- _$$ref$6.pointer,
- _$$ref$7.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3.pointer,
);
}
@@ -9872,7 +9781,7 @@
/// copy or move the file at the given location to a new location as it will be
/// removed when the delegate message returns. URLSession:task:didCompleteWithError: will
/// still be called.
- void URLSession(
+ void URLSession$3(
NSURLSession session, {
required NSURLSessionDownloadTask downloadTask,
required objc.NSURL didFinishDownloadingToURL,
@@ -9899,7 +9808,7 @@
/// error, the -userInfo dictionary of the error will contain an
/// NSURLSessionDownloadTaskResumeData key, whose value is the resume
/// data.
- void URLSession$1(
+ void URLSession$4(
NSURLSession session, {
required NSURLSessionDownloadTask downloadTask,
required int didResumeAtOffset,
@@ -9933,7 +9842,7 @@
}
/// Sent periodically to notify the delegate of download progress.
- void URLSession$2(
+ void URLSession$5(
NSURLSession session, {
required NSURLSessionDownloadTask downloadTask,
required int didWriteData,
@@ -9970,22 +9879,22 @@
/// Sent as the last message related to a specific task. Error may be
/// nil, which implies that no error occurred and this task is complete.
- void URLSession$8(
+ void URLSession$6(
NSURLSession session, {
required NSURLSessionTask task,
objc.NSError? didCompleteWithError,
}) {
- final _$$ref$4 = object$.ref;
- final _$$ref$5 = session.ref;
- final _$$ref$6 = task.ref;
- final _$$ref$7 = didCompleteWithError?.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = didCompleteWithError?.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadDelegate.URLSession:task:didCompleteWithError:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$4.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didCompleteWithError_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -9994,31 +9903,31 @@
);
}
_objc_msgSend_r8gdi7(
- _$$ref$4.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didCompleteWithError_,
- _$$ref$5.pointer,
- _$$ref$6.pointer,
- _$$ref$7?.pointer ?? ffi.nullptr,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3?.pointer ?? ffi.nullptr,
);
}
/// Sent when complete statistics information has been collected for the task.
- void URLSession$9(
+ void URLSession$7(
NSURLSession session, {
required NSURLSessionTask task,
required NSURLSessionTaskMetrics didFinishCollectingMetrics,
}) {
- final _$$ref$4 = object$.ref;
- final _$$ref$5 = session.ref;
- final _$$ref$6 = task.ref;
- final _$$ref$7 = didFinishCollectingMetrics.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = didFinishCollectingMetrics.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadDelegate.URLSession:task:didFinishCollectingMetrics:',
iOS: (false, (10, 0, 0)),
macOS: (false, (10, 12, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$4.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didFinishCollectingMetrics_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -10027,11 +9936,11 @@
);
}
_objc_msgSend_r8gdi7(
- _$$ref$4.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didFinishCollectingMetrics_,
- _$$ref$5.pointer,
- _$$ref$6.pointer,
- _$$ref$7.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3.pointer,
);
}
@@ -10039,25 +9948,25 @@
/// If this delegate is not implemented, the session specific authentication challenge
/// will *NOT* be called and the behavior will be the same as using the default handling
/// disposition.
- void URLSession$10(
+ void URLSession$8(
NSURLSession session, {
required NSURLSessionTask task,
required NSURLAuthenticationChallenge didReceiveChallenge,
required objc.ObjCBlock<ffi.Void Function(ffi.Long, NSURLCredential?)>
completionHandler,
}) {
- final _$$ref$5 = object$.ref;
- final _$$ref$6 = session.ref;
- final _$$ref$7 = task.ref;
- final _$$ref$8 = didReceiveChallenge.ref;
- final _$$ref$9 = completionHandler.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = didReceiveChallenge.ref;
+ final _$$ref$4 = completionHandler.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadDelegate.URLSession:task:didReceiveChallenge:completionHandler:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$5.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didReceiveChallenge_completionHandler_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -10066,32 +9975,32 @@
);
}
_objc_msgSend_m7tls4(
- _$$ref$5.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didReceiveChallenge_completionHandler_,
- _$$ref$6.pointer,
- _$$ref$7.pointer,
- _$$ref$8.pointer,
- _$$ref$9.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3.pointer,
+ _$$ref$4.pointer,
);
}
/// Sent for each informational response received except 101 switching protocols.
- void URLSession$11(
+ void URLSession$9(
NSURLSession session, {
required NSURLSessionTask task,
required NSHTTPURLResponse didReceiveInformationalResponse,
}) {
- final _$$ref$4 = object$.ref;
- final _$$ref$5 = session.ref;
- final _$$ref$6 = task.ref;
- final _$$ref$7 = didReceiveInformationalResponse.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = didReceiveInformationalResponse.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadDelegate.URLSession:task:didReceiveInformationalResponse:',
iOS: (false, (17, 0, 0)),
macOS: (false, (14, 0, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$4.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didReceiveInformationalResponse_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -10100,33 +10009,33 @@
);
}
_objc_msgSend_r8gdi7(
- _$$ref$4.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didReceiveInformationalResponse_,
- _$$ref$5.pointer,
- _$$ref$6.pointer,
- _$$ref$7.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3.pointer,
);
}
/// Sent periodically to notify the delegate of upload progress. This
/// information is also available as properties of the task.
- void URLSession$12(
+ void URLSession$10(
NSURLSession session, {
required NSURLSessionTask task,
required int didSendBodyData,
required int totalBytesSent,
required int totalBytesExpectedToSend,
}) {
- final _$$ref$3 = object$.ref;
- final _$$ref$4 = session.ref;
- final _$$ref$5 = task.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadDelegate.URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$3.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -10135,10 +10044,10 @@
);
}
_objc_msgSend_1modw1b(
- _$$ref$3.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_,
- _$$ref$4.pointer,
- _$$ref$5.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
didSendBodyData,
totalBytesSent,
totalBytesExpectedToSend,
@@ -10148,23 +10057,23 @@
/// Sent if a task requires a new, unopened body stream. This may be
/// necessary when authentication has failed for any request that
/// involves a body stream.
- void URLSession$13(
+ void URLSession$11(
NSURLSession session, {
required NSURLSessionTask task,
required objc.ObjCBlock<ffi.Void Function(objc.NSInputStream?)>
needNewBodyStream,
}) {
- final _$$ref$4 = object$.ref;
- final _$$ref$5 = session.ref;
- final _$$ref$6 = task.ref;
- final _$$ref$7 = needNewBodyStream.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = needNewBodyStream.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadDelegate.URLSession:task:needNewBodyStream:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$4.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_needNewBodyStream_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -10173,11 +10082,11 @@
);
}
_objc_msgSend_18qun1e(
- _$$ref$4.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_needNewBodyStream_,
- _$$ref$5.pointer,
- _$$ref$6.pointer,
- _$$ref$7.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3.pointer,
);
}
@@ -10188,24 +10097,24 @@
/// - Parameter task: The task that needs a new body stream.
/// - Parameter offset: The starting offset required for the body stream.
/// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream.
- void URLSession$14(
+ void URLSession$12(
NSURLSession session, {
required NSURLSessionTask task,
required int needNewBodyStreamFromOffset,
required objc.ObjCBlock<ffi.Void Function(objc.NSInputStream?)>
completionHandler,
}) {
- final _$$ref$4 = object$.ref;
- final _$$ref$5 = session.ref;
- final _$$ref$6 = task.ref;
- final _$$ref$7 = completionHandler.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = completionHandler.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadDelegate.URLSession:task:needNewBodyStreamFromOffset:completionHandler:',
iOS: (false, (17, 0, 0)),
macOS: (false, (14, 0, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$4.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -10214,12 +10123,12 @@
);
}
_objc_msgSend_9cddqw(
- _$$ref$4.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_,
- _$$ref$5.pointer,
- _$$ref$6.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
needNewBodyStreamFromOffset,
- _$$ref$7.pointer,
+ _$$ref$3.pointer,
);
}
@@ -10243,25 +10152,25 @@
/// Canceling the task is equivalent to calling the task's cancel method; the
/// URLSession:task:didCompleteWithError: task delegate will be called with error
/// NSURLErrorCancelled.
- void URLSession$15(
+ void URLSession$13(
NSURLSession session, {
required NSURLSessionTask task,
required NSURLRequest willBeginDelayedRequest,
required objc.ObjCBlock<ffi.Void Function(ffi.Long, NSURLRequest?)>
completionHandler,
}) {
- final _$$ref$5 = object$.ref;
- final _$$ref$6 = session.ref;
- final _$$ref$7 = task.ref;
- final _$$ref$8 = willBeginDelayedRequest.ref;
- final _$$ref$9 = completionHandler.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = willBeginDelayedRequest.ref;
+ final _$$ref$4 = completionHandler.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadDelegate.URLSession:task:willBeginDelayedRequest:completionHandler:',
iOS: (false, (11, 0, 0)),
macOS: (false, (10, 13, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$5.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_willBeginDelayedRequest_completionHandler_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -10270,12 +10179,12 @@
);
}
_objc_msgSend_m7tls4(
- _$$ref$5.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_willBeginDelayedRequest_completionHandler_,
- _$$ref$6.pointer,
- _$$ref$7.pointer,
- _$$ref$8.pointer,
- _$$ref$9.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3.pointer,
+ _$$ref$4.pointer,
);
}
@@ -10287,26 +10196,26 @@
/// is to follow redirections.
///
/// For tasks in background sessions, redirections will always be followed and this method will not be called.
- void URLSession$16(
+ void URLSession$14(
NSURLSession session, {
required NSURLSessionTask task,
required NSHTTPURLResponse willPerformHTTPRedirection,
required NSURLRequest newRequest,
required objc.ObjCBlock<ffi.Void Function(NSURLRequest?)> completionHandler,
}) {
- final _$$ref$6 = object$.ref;
- final _$$ref$7 = session.ref;
- final _$$ref$8 = task.ref;
- final _$$ref$9 = willPerformHTTPRedirection.ref;
- final _$$ref$10 = newRequest.ref;
- final _$$ref$11 = completionHandler.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = willPerformHTTPRedirection.ref;
+ final _$$ref$4 = newRequest.ref;
+ final _$$ref$5 = completionHandler.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadDelegate.URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$6.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -10315,13 +10224,13 @@
);
}
_objc_msgSend_e1wgee(
- _$$ref$6.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_,
- _$$ref$7.pointer,
- _$$ref$8.pointer,
- _$$ref$9.pointer,
- _$$ref$10.pointer,
- _$$ref$11.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3.pointer,
+ _$$ref$4.pointer,
+ _$$ref$5.pointer,
);
}
@@ -10334,20 +10243,20 @@
///
/// This delegate callback will never be called for background sessions, because
/// the waitForConnectivity property is ignored by those sessions.
- void URLSession$17(
+ void URLSession$15(
NSURLSession session, {
required NSURLSessionTask taskIsWaitingForConnectivity,
}) {
- final _$$ref$3 = object$.ref;
- final _$$ref$4 = session.ref;
- final _$$ref$5 = taskIsWaitingForConnectivity.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = taskIsWaitingForConnectivity.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadDelegate.URLSession:taskIsWaitingForConnectivity:',
iOS: (false, (11, 0, 0)),
macOS: (false, (10, 13, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$3.pointer,
+ _$$ref.pointer,
_sel_URLSession_taskIsWaitingForConnectivity_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -10356,10 +10265,10 @@
);
}
_objc_msgSend_pfv6jd(
- _$$ref$3.pointer,
+ _$$ref.pointer,
_sel_URLSession_taskIsWaitingForConnectivity_,
- _$$ref$4.pointer,
- _$$ref$5.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
);
}
@@ -10371,15 +10280,15 @@
/// completion handler, or to begin any internal updates that will
/// result in invoking the completion handler.
void URLSessionDidFinishEventsForBackgroundURLSession(NSURLSession session) {
- final _$$ref$2 = object$.ref;
- final _$$ref$3 = session.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadDelegate.URLSessionDidFinishEventsForBackgroundURLSession:',
iOS: (false, (7, 0, 0)),
macOS: (false, (11, 0, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$2.pointer,
+ _$$ref.pointer,
_sel_URLSessionDidFinishEventsForBackgroundURLSession_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -10388,9 +10297,9 @@
);
}
_objc_msgSend_xtuoz7(
- _$$ref$2.pointer,
+ _$$ref.pointer,
_sel_URLSessionDidFinishEventsForBackgroundURLSession_,
- _$$ref$3.pointer,
+ _$$ref$1.pointer,
);
}
}
@@ -12690,14 +12599,14 @@
/// init
NSURLSessionDownloadTask init() {
- final _$$ref$9 = object$.ref;
+ final _$$ref = object$.ref;
objc.checkOsVersionInternal(
'NSURLSessionDownloadTask.init',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 0, 0)),
);
final $ret = _objc_msgSend_151sglz(
- _$$ref$9.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_init,
);
return NSURLSessionDownloadTask.fromPointer(
@@ -13070,14 +12979,14 @@
/// init
NSURLSessionTask init() {
- final _$$ref$10 = object$.ref;
+ final _$$ref = object$.ref;
objc.checkOsVersionInternal(
'NSURLSessionTask.init',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 0, 0)),
);
final $ret = _objc_msgSend_151sglz(
- _$$ref$10.retainAndReturnPointer(),
+ _$$ref.retainAndReturnPointer(),
_sel_init,
);
return NSURLSessionTask.fromPointer($ret, retain: false, release: true);
@@ -13145,8 +13054,8 @@
/// progress
objc.NSProgress get progress {
- final _$$ref$1 = object$.ref;
- final $ret = _objc_msgSend_151sglz(_$$ref$1.pointer, _sel_progress);
+ final _$$ref = object$.ref;
+ final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_progress);
return objc.NSProgress.fromPointer($ret, retain: true, release: true);
}
@@ -13575,20 +13484,20 @@
/// The last message a session receives. A session will only become
/// invalid because of a systemic error or when it has been
/// explicitly invalidated, in which case the error parameter will be nil.
- void URLSession$5(
+ void URLSession(
NSURLSession session, {
objc.NSError? didBecomeInvalidWithError,
}) {
- final _$$ref$6 = object$.ref;
- final _$$ref$7 = session.ref;
- final _$$ref$8 = didBecomeInvalidWithError?.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = didBecomeInvalidWithError?.ref;
objc.checkOsVersionInternal(
'NSURLSessionWebSocketDelegate.URLSession:didBecomeInvalidWithError:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$6.pointer,
+ _$$ref.pointer,
_sel_URLSession_didBecomeInvalidWithError_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -13597,10 +13506,10 @@
);
}
_objc_msgSend_pfv6jd(
- _$$ref$6.pointer,
+ _$$ref.pointer,
_sel_URLSession_didBecomeInvalidWithError_,
- _$$ref$7.pointer,
- _$$ref$8?.pointer ?? ffi.nullptr,
+ _$$ref$1.pointer,
+ _$$ref$2?.pointer ?? ffi.nullptr,
);
}
@@ -13609,20 +13518,20 @@
///
/// This delegate callback is *NOT* dispatched to the delegate queue. It is
/// invoked synchronously before the task creation method returns.
- void URLSession$6(
+ void URLSession$1(
NSURLSession session, {
required NSURLSessionTask didCreateTask,
}) {
- final _$$ref$6 = object$.ref;
- final _$$ref$7 = session.ref;
- final _$$ref$8 = didCreateTask.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = didCreateTask.ref;
objc.checkOsVersionInternal(
'NSURLSessionWebSocketDelegate.URLSession:didCreateTask:',
iOS: (false, (16, 0, 0)),
macOS: (false, (13, 0, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$6.pointer,
+ _$$ref.pointer,
_sel_URLSession_didCreateTask_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -13631,10 +13540,10 @@
);
}
_objc_msgSend_pfv6jd(
- _$$ref$6.pointer,
+ _$$ref.pointer,
_sel_URLSession_didCreateTask_,
- _$$ref$7.pointer,
- _$$ref$8.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
);
}
@@ -13646,23 +13555,23 @@
/// challenges). If this delegate message is not implemented, the
/// behavior will be to use the default handling, which may involve user
/// interaction.
- void URLSession$7(
+ void URLSession$2(
NSURLSession session, {
required NSURLAuthenticationChallenge didReceiveChallenge,
required objc.ObjCBlock<ffi.Void Function(ffi.Long, NSURLCredential?)>
completionHandler,
}) {
- final _$$ref$8 = object$.ref;
- final _$$ref$9 = session.ref;
- final _$$ref$10 = didReceiveChallenge.ref;
- final _$$ref$11 = completionHandler.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = didReceiveChallenge.ref;
+ final _$$ref$3 = completionHandler.ref;
objc.checkOsVersionInternal(
'NSURLSessionWebSocketDelegate.URLSession:didReceiveChallenge:completionHandler:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$8.pointer,
+ _$$ref.pointer,
_sel_URLSession_didReceiveChallenge_completionHandler_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -13671,32 +13580,32 @@
);
}
_objc_msgSend_18qun1e(
- _$$ref$8.pointer,
+ _$$ref.pointer,
_sel_URLSession_didReceiveChallenge_completionHandler_,
- _$$ref$9.pointer,
- _$$ref$10.pointer,
- _$$ref$11.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3.pointer,
);
}
/// Sent as the last message related to a specific task. Error may be
/// nil, which implies that no error occurred and this task is complete.
- void URLSession$8(
+ void URLSession$3(
NSURLSession session, {
required NSURLSessionTask task,
objc.NSError? didCompleteWithError,
}) {
- final _$$ref$8 = object$.ref;
- final _$$ref$9 = session.ref;
- final _$$ref$10 = task.ref;
- final _$$ref$11 = didCompleteWithError?.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = didCompleteWithError?.ref;
objc.checkOsVersionInternal(
'NSURLSessionWebSocketDelegate.URLSession:task:didCompleteWithError:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$8.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didCompleteWithError_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -13705,31 +13614,31 @@
);
}
_objc_msgSend_r8gdi7(
- _$$ref$8.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didCompleteWithError_,
- _$$ref$9.pointer,
- _$$ref$10.pointer,
- _$$ref$11?.pointer ?? ffi.nullptr,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3?.pointer ?? ffi.nullptr,
);
}
/// Sent when complete statistics information has been collected for the task.
- void URLSession$9(
+ void URLSession$4(
NSURLSession session, {
required NSURLSessionTask task,
required NSURLSessionTaskMetrics didFinishCollectingMetrics,
}) {
- final _$$ref$8 = object$.ref;
- final _$$ref$9 = session.ref;
- final _$$ref$10 = task.ref;
- final _$$ref$11 = didFinishCollectingMetrics.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = didFinishCollectingMetrics.ref;
objc.checkOsVersionInternal(
'NSURLSessionWebSocketDelegate.URLSession:task:didFinishCollectingMetrics:',
iOS: (false, (10, 0, 0)),
macOS: (false, (10, 12, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$8.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didFinishCollectingMetrics_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -13738,11 +13647,11 @@
);
}
_objc_msgSend_r8gdi7(
- _$$ref$8.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didFinishCollectingMetrics_,
- _$$ref$9.pointer,
- _$$ref$10.pointer,
- _$$ref$11.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3.pointer,
);
}
@@ -13750,25 +13659,25 @@
/// If this delegate is not implemented, the session specific authentication challenge
/// will *NOT* be called and the behavior will be the same as using the default handling
/// disposition.
- void URLSession$10(
+ void URLSession$5(
NSURLSession session, {
required NSURLSessionTask task,
required NSURLAuthenticationChallenge didReceiveChallenge,
required objc.ObjCBlock<ffi.Void Function(ffi.Long, NSURLCredential?)>
completionHandler,
}) {
- final _$$ref$10 = object$.ref;
- final _$$ref$11 = session.ref;
- final _$$ref$12 = task.ref;
- final _$$ref$13 = didReceiveChallenge.ref;
- final _$$ref$14 = completionHandler.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = didReceiveChallenge.ref;
+ final _$$ref$4 = completionHandler.ref;
objc.checkOsVersionInternal(
'NSURLSessionWebSocketDelegate.URLSession:task:didReceiveChallenge:completionHandler:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$10.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didReceiveChallenge_completionHandler_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -13777,32 +13686,32 @@
);
}
_objc_msgSend_m7tls4(
- _$$ref$10.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didReceiveChallenge_completionHandler_,
- _$$ref$11.pointer,
- _$$ref$12.pointer,
- _$$ref$13.pointer,
- _$$ref$14.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3.pointer,
+ _$$ref$4.pointer,
);
}
/// Sent for each informational response received except 101 switching protocols.
- void URLSession$11(
+ void URLSession$6(
NSURLSession session, {
required NSURLSessionTask task,
required NSHTTPURLResponse didReceiveInformationalResponse,
}) {
- final _$$ref$8 = object$.ref;
- final _$$ref$9 = session.ref;
- final _$$ref$10 = task.ref;
- final _$$ref$11 = didReceiveInformationalResponse.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = didReceiveInformationalResponse.ref;
objc.checkOsVersionInternal(
'NSURLSessionWebSocketDelegate.URLSession:task:didReceiveInformationalResponse:',
iOS: (false, (17, 0, 0)),
macOS: (false, (14, 0, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$8.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didReceiveInformationalResponse_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -13811,33 +13720,33 @@
);
}
_objc_msgSend_r8gdi7(
- _$$ref$8.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didReceiveInformationalResponse_,
- _$$ref$9.pointer,
- _$$ref$10.pointer,
- _$$ref$11.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3.pointer,
);
}
/// Sent periodically to notify the delegate of upload progress. This
/// information is also available as properties of the task.
- void URLSession$12(
+ void URLSession$7(
NSURLSession session, {
required NSURLSessionTask task,
required int didSendBodyData,
required int totalBytesSent,
required int totalBytesExpectedToSend,
}) {
- final _$$ref$6 = object$.ref;
- final _$$ref$7 = session.ref;
- final _$$ref$8 = task.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
objc.checkOsVersionInternal(
'NSURLSessionWebSocketDelegate.URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$6.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -13846,10 +13755,10 @@
);
}
_objc_msgSend_1modw1b(
- _$$ref$6.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_,
- _$$ref$7.pointer,
- _$$ref$8.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
didSendBodyData,
totalBytesSent,
totalBytesExpectedToSend,
@@ -13859,23 +13768,23 @@
/// Sent if a task requires a new, unopened body stream. This may be
/// necessary when authentication has failed for any request that
/// involves a body stream.
- void URLSession$13(
+ void URLSession$8(
NSURLSession session, {
required NSURLSessionTask task,
required objc.ObjCBlock<ffi.Void Function(objc.NSInputStream?)>
needNewBodyStream,
}) {
- final _$$ref$8 = object$.ref;
- final _$$ref$9 = session.ref;
- final _$$ref$10 = task.ref;
- final _$$ref$11 = needNewBodyStream.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = needNewBodyStream.ref;
objc.checkOsVersionInternal(
'NSURLSessionWebSocketDelegate.URLSession:task:needNewBodyStream:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$8.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_needNewBodyStream_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -13884,11 +13793,11 @@
);
}
_objc_msgSend_18qun1e(
- _$$ref$8.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_needNewBodyStream_,
- _$$ref$9.pointer,
- _$$ref$10.pointer,
- _$$ref$11.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3.pointer,
);
}
@@ -13899,24 +13808,24 @@
/// - Parameter task: The task that needs a new body stream.
/// - Parameter offset: The starting offset required for the body stream.
/// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream.
- void URLSession$14(
+ void URLSession$9(
NSURLSession session, {
required NSURLSessionTask task,
required int needNewBodyStreamFromOffset,
required objc.ObjCBlock<ffi.Void Function(objc.NSInputStream?)>
completionHandler,
}) {
- final _$$ref$8 = object$.ref;
- final _$$ref$9 = session.ref;
- final _$$ref$10 = task.ref;
- final _$$ref$11 = completionHandler.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = completionHandler.ref;
objc.checkOsVersionInternal(
'NSURLSessionWebSocketDelegate.URLSession:task:needNewBodyStreamFromOffset:completionHandler:',
iOS: (false, (17, 0, 0)),
macOS: (false, (14, 0, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$8.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -13925,12 +13834,12 @@
);
}
_objc_msgSend_9cddqw(
- _$$ref$8.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_,
- _$$ref$9.pointer,
- _$$ref$10.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
needNewBodyStreamFromOffset,
- _$$ref$11.pointer,
+ _$$ref$3.pointer,
);
}
@@ -13954,25 +13863,25 @@
/// Canceling the task is equivalent to calling the task's cancel method; the
/// URLSession:task:didCompleteWithError: task delegate will be called with error
/// NSURLErrorCancelled.
- void URLSession$15(
+ void URLSession$10(
NSURLSession session, {
required NSURLSessionTask task,
required NSURLRequest willBeginDelayedRequest,
required objc.ObjCBlock<ffi.Void Function(ffi.Long, NSURLRequest?)>
completionHandler,
}) {
- final _$$ref$10 = object$.ref;
- final _$$ref$11 = session.ref;
- final _$$ref$12 = task.ref;
- final _$$ref$13 = willBeginDelayedRequest.ref;
- final _$$ref$14 = completionHandler.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = willBeginDelayedRequest.ref;
+ final _$$ref$4 = completionHandler.ref;
objc.checkOsVersionInternal(
'NSURLSessionWebSocketDelegate.URLSession:task:willBeginDelayedRequest:completionHandler:',
iOS: (false, (11, 0, 0)),
macOS: (false, (10, 13, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$10.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_willBeginDelayedRequest_completionHandler_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -13981,12 +13890,12 @@
);
}
_objc_msgSend_m7tls4(
- _$$ref$10.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_willBeginDelayedRequest_completionHandler_,
- _$$ref$11.pointer,
- _$$ref$12.pointer,
- _$$ref$13.pointer,
- _$$ref$14.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3.pointer,
+ _$$ref$4.pointer,
);
}
@@ -13998,26 +13907,26 @@
/// is to follow redirections.
///
/// For tasks in background sessions, redirections will always be followed and this method will not be called.
- void URLSession$16(
+ void URLSession$11(
NSURLSession session, {
required NSURLSessionTask task,
required NSHTTPURLResponse willPerformHTTPRedirection,
required NSURLRequest newRequest,
required objc.ObjCBlock<ffi.Void Function(NSURLRequest?)> completionHandler,
}) {
- final _$$ref$12 = object$.ref;
- final _$$ref$13 = session.ref;
- final _$$ref$14 = task.ref;
- final _$$ref$15 = willPerformHTTPRedirection.ref;
- final _$$ref$16 = newRequest.ref;
- final _$$ref$17 = completionHandler.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = task.ref;
+ final _$$ref$3 = willPerformHTTPRedirection.ref;
+ final _$$ref$4 = newRequest.ref;
+ final _$$ref$5 = completionHandler.ref;
objc.checkOsVersionInternal(
'NSURLSessionWebSocketDelegate.URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$12.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -14026,13 +13935,13 @@
);
}
_objc_msgSend_e1wgee(
- _$$ref$12.pointer,
+ _$$ref.pointer,
_sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_,
- _$$ref$13.pointer,
- _$$ref$14.pointer,
- _$$ref$15.pointer,
- _$$ref$16.pointer,
- _$$ref$17.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
+ _$$ref$3.pointer,
+ _$$ref$4.pointer,
+ _$$ref$5.pointer,
);
}
@@ -14045,20 +13954,20 @@
///
/// This delegate callback will never be called for background sessions, because
/// the waitForConnectivity property is ignored by those sessions.
- void URLSession$17(
+ void URLSession$12(
NSURLSession session, {
required NSURLSessionTask taskIsWaitingForConnectivity,
}) {
- final _$$ref$6 = object$.ref;
- final _$$ref$7 = session.ref;
- final _$$ref$8 = taskIsWaitingForConnectivity.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
+ final _$$ref$2 = taskIsWaitingForConnectivity.ref;
objc.checkOsVersionInternal(
'NSURLSessionWebSocketDelegate.URLSession:taskIsWaitingForConnectivity:',
iOS: (false, (11, 0, 0)),
macOS: (false, (10, 13, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$6.pointer,
+ _$$ref.pointer,
_sel_URLSession_taskIsWaitingForConnectivity_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -14067,17 +13976,17 @@
);
}
_objc_msgSend_pfv6jd(
- _$$ref$6.pointer,
+ _$$ref.pointer,
_sel_URLSession_taskIsWaitingForConnectivity_,
- _$$ref$7.pointer,
- _$$ref$8.pointer,
+ _$$ref$1.pointer,
+ _$$ref$2.pointer,
);
}
/// Indicates that the WebSocket has received a close frame from the server endpoint.
/// The close code and the close reason may be provided by the delegate if the server elects to send
/// this information in the close frame
- void URLSession(
+ void URLSession$13(
NSURLSession session, {
required NSURLSessionWebSocketTask webSocketTask,
required int didCloseWithCode,
@@ -14113,7 +14022,7 @@
/// Indicates that the WebSocket handshake was successful and the connection has been upgraded to webSockets.
/// It will also provide the protocol that is picked in the handshake. If the handshake fails, this delegate will not be invoked.
- void URLSession$1(
+ void URLSession$14(
NSURLSession session, {
required NSURLSessionWebSocketTask webSocketTask,
objc.NSString? didOpenWithProtocol,
@@ -14153,15 +14062,15 @@
/// completion handler, or to begin any internal updates that will
/// result in invoking the completion handler.
void URLSessionDidFinishEventsForBackgroundURLSession(NSURLSession session) {
- final _$$ref$4 = object$.ref;
- final _$$ref$5 = session.ref;
+ final _$$ref = object$.ref;
+ final _$$ref$1 = session.ref;
objc.checkOsVersionInternal(
'NSURLSessionWebSocketDelegate.URLSessionDidFinishEventsForBackgroundURLSession:',
iOS: (false, (7, 0, 0)),
macOS: (false, (11, 0, 0)),
);
if (!objc.respondsToSelector(
- _$$ref$4.pointer,
+ _$$ref.pointer,
_sel_URLSessionDidFinishEventsForBackgroundURLSession_,
)) {
throw objc.UnimplementedOptionalMethodException(
@@ -14170,9 +14079,9 @@
);
}
_objc_msgSend_xtuoz7(
- _$$ref$4.pointer,
+ _$$ref.pointer,
_sel_URLSessionDidFinishEventsForBackgroundURLSession_,
- _$$ref$5.pointer,
+ _$$ref$1.pointer,
);
}
}
@@ -30782,9 +30691,6 @@
"allowsExpensiveNetworkAccess",
);
late final _sel_allowsPersistentDNS = objc.registerName("allowsPersistentDNS");
-late final _sel_allowsUltraConstrainedNetworkAccess = objc.registerName(
- "allowsUltraConstrainedNetworkAccess",
-);
late final _sel_arg0 = objc.registerName("arg0");
late final _sel_arg1 = objc.registerName("arg1");
late final _sel_arg2 = objc.registerName("arg2");
@@ -31007,9 +30913,6 @@
late final _sel_setAllowsPersistentDNS_ = objc.registerName(
"setAllowsPersistentDNS:",
);
-late final _sel_setAllowsUltraConstrainedNetworkAccess_ = objc.registerName(
- "setAllowsUltraConstrainedNetworkAccess:",
-);
late final _sel_setAssumesHTTP3Capable_ = objc.registerName(
"setAssumesHTTP3Capable:",
);
diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml
index 6ac17de..1304bac 100644
--- a/pkgs/cupertino_http/pubspec.yaml
+++ b/pkgs/cupertino_http/pubspec.yaml
@@ -1,5 +1,5 @@
name: cupertino_http
-version: 3.1.0
+version: 3.1.1-wip
description: >-
A macOS/iOS Flutter plugin that provides access to the Foundation URL
Loading System.
@@ -10,21 +10,21 @@
dependencies:
async: ^2.5.0
- code_assets: ^1.0.0
+ code_assets: ^2.0.0
ffi: ^2.1.0
hooks: ^2.0.0
http: ^1.5.0
http_profile: ^0.1.0
logging: ^1.3.0
native_toolchain_c: ^0.19.1
- objective_c: ^9.5.0
+ objective_c: ^9.6.0
web_socket: '>=0.1.5 <2.0.0'
dev_dependencies:
convert: ^3.1.1
crypto: ^3.0.3
dart_flutter_team_lints: ^3.0.0
- ffigen: ^21.0.0
+ ffigen: ^22.0.0
http_client_conformance_tests:
path: ../http_client_conformance_tests/
test: ^1.21.1
diff --git a/pkgs/cupertino_http/tool/ffigen.dart b/pkgs/cupertino_http/tool/ffigen.dart
new file mode 100644
index 0000000..13dde3f
--- /dev/null
+++ b/pkgs/cupertino_http/tool/ffigen.dart
@@ -0,0 +1,112 @@
+// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+import 'package:ffigen/ffigen.dart';
+
+FfiGenerator getConfig(Uri packageRoot) {
+ const headers = [
+ 'NSURLCache.h',
+ 'NSURLRequest.h',
+ 'NSURLSession.h',
+ 'NSURL.h',
+ 'NSLock.h',
+ 'NSProgress.h',
+ 'NSURLResponse.h',
+ 'NSHTTPCookieStorage.h',
+ 'NSOperation.h',
+ 'NSError.h',
+ 'NSDictionary.h',
+ ];
+ return FfiGenerator(
+ input: Input(
+ entryPoints: [
+ for (final header in headers)
+ macSdkUri.resolve(
+ 'System/Library/Frameworks/Foundation.framework/Headers/$header',
+ ),
+ ],
+ ),
+ objectiveC: const ObjectiveC(),
+ output: Output(
+ dart: DartOutput(
+ path: packageRoot.resolve('lib/src/native_cupertino_bindings.dart'),
+ ),
+ objectiveCFile: packageRoot.resolve('src/native_cupertino_bindings.m'),
+ commentType: const CommentType(CommentStyle.any, CommentLength.full),
+ ),
+ visitors: [
+ Visitor(
+ objCInterface: (node) {
+ const included = {
+ 'NSCondition',
+ 'NSHTTPURLResponse',
+ 'NSMutableURLRequest',
+ 'NSOperationQueue',
+ 'NSURLCache',
+ 'NSURLRequest',
+ 'NSURLResponse',
+ 'NSURLSession',
+ 'NSURLSessionConfiguration',
+ 'NSURLSessionDownloadTask',
+ 'NSURLSessionTask',
+ 'NSURLSessionWebSocketMessage',
+ 'NSURLSessionWebSocketTask',
+ };
+ node.isIncluded = included.contains(node.originalName);
+ },
+ objCProtocol: (node) {
+ const included = {
+ 'NSURLSessionDataDelegate',
+ 'NSURLSessionDownloadDelegate',
+ 'NSURLSessionWebSocketDelegate',
+ };
+ node.isIncluded = included.contains(node.originalName);
+ },
+ enumClass: (node) {
+ const included = {
+ 'NSHTTPCookieAcceptPolicy',
+ 'NSURLRequestCachePolicy',
+ 'NSURLRequestNetworkServiceType',
+ 'NSURLSessionMultipathServiceType',
+ 'NSURLSessionResponseDisposition',
+ 'NSURLSessionTaskState',
+ 'NSURLSessionWebSocketCloseCode',
+ 'NSURLSessionWebSocketMessageType',
+ };
+ node.isIncluded = included.contains(node.originalName);
+
+ const intEnums = {'NSURLSessionWebSocketCloseCode'};
+ node.style = intEnums.contains(node.originalName)
+ ? .intConstants
+ : null;
+ },
+ ),
+ ],
+ );
+}
+
+Uri _findPackageRoot() {
+ if (Platform.script.isScheme('file')) {
+ var dir = Directory.fromUri(Platform.script).parent;
+ while (dir.path != dir.parent.path) {
+ final pubspec = File.fromUri(dir.uri.resolve('pubspec.yaml'));
+ if (pubspec.existsSync()) {
+ final content = pubspec.readAsStringSync();
+ if (content.contains('name: cupertino_http\n') ||
+ content.contains('name: cupertino_http\r\n')) {
+ return dir.uri;
+ }
+ }
+ dir = dir.parent;
+ }
+ }
+ return Directory.current.uri;
+}
+
+Future<void> main() async {
+ final packageRoot = _findPackageRoot();
+ await getConfig(packageRoot).generate();
+}