Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkgs/cupertino_http/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.2-wip

* Upgrade to `package:objective_c` 4.0.

## 2.0.1

* Fix a [bug](https://github.com/dart-lang/http/issues/1398) where
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,3 @@ _DidFinish adaptFinishWithLock(_DidFinishWithLock block) {
[lock unlock];
};
}

void doNotCall() {
// TODO(https://github.com/dart-lang/native/issues/1672): Remove
// when fixed.
// Force the protocol information to be available at runtime.
@protocol (NSURLSessionDataDelegate);
@protocol (NSURLSessionDownloadDelegate);
@protocol (NSURLSessionWebSocketDelegate);
}
4 changes: 2 additions & 2 deletions pkgs/cupertino_http/example/integration_test/utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ void main() {
test('non-string value', () {
final d = objc.NSMutableDictionary.new1()
..setObject_forKey_(
objc.NSNumber.numberWithInteger_(5), 'key'.toNSString());
objc.NSNumberCreation.numberWithInteger_(5), 'key'.toNSString());
expect(() => stringNSDictionaryToMap(d), throwsUnsupportedError);
});

test('non-string key', () {
final d = objc.NSMutableDictionary.new1()
..setObject_forKey_(
'value'.toNSString(), objc.NSNumber.numberWithInteger_(5));
'value'.toNSString(), objc.NSNumberCreation.numberWithInteger_(5));
expect(() => stringNSDictionaryToMap(d), throwsUnsupportedError);
});
});
Expand Down
2 changes: 1 addition & 1 deletion pkgs/cupertino_http/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dev_dependencies:
http_profile: ^0.1.0
integration_test:
sdk: flutter
objective_c: ^3.0.0
objective_c: ^4.0.0
test: ^1.21.1
web_socket_conformance_tests:
path: ../../web_socket_conformance_tests/
Expand Down
6 changes: 6 additions & 0 deletions pkgs/cupertino_http/ffigen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ preamble: |
// ignore_for_file: return_of_invalid_type
objc-interfaces:
include:
- 'NSCondition'
- 'NSHTTPURLResponse'
- 'NSMutableURLRequest'
- 'NSOperationQueue'
Expand All @@ -43,6 +44,11 @@ objc-interfaces:
- 'NSURLSessionTask'
- 'NSURLSessionWebSocketMessage'
- 'NSURLSessionWebSocketTask'
objc-protocols:
include:
- 'NSURLSessionDataDelegate'
- 'NSURLSessionDownloadDelegate'
- 'NSURLSessionWebSocketDelegate'
comments:
style: any
length: full
Expand Down
2 changes: 1 addition & 1 deletion pkgs/cupertino_http/lib/src/cupertino_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ class URLSession extends _ObjectHolder<ncb.NSURLSession> {
.registerName('URLSession:downloadTask:didFinishDownloadingToURL:');
final signature = objc.getProtocolMethodSignature(
downloadDelegate, didFinishDownloadingToURL,
isRequired: true, isInstanceMethod: true);
isRequired: true, isInstanceMethod: true)!;
protoBuilder.implementMethod(didFinishDownloadingToURL, signature,
linkedLibs.adaptFinishWithLock(asyncFinishDownloading));
}
Expand Down
Loading
Loading