Skip to content

Upgrade to package:objective_c 7.0.0 #1726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 13, 2025
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
7 changes: 6 additions & 1 deletion pkgs/cupertino_http/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
## 2.0.3-wip
## 2.1.0-wip

* Remove some unnecessary native code.
* Upgrade to `package:objective_c` 7.0.
* Upgrade to `package:ffigen` 18.0.
* Fix a [bug](https://github.com/dart-lang/http/issues/1702) where
`package:cupertino_http` did not work with `package:firebase_performance`
enabled.

## 2.0.2

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ void testProperties(URLSessionConfiguration config) {
config.multipathServiceType,
NSURLSessionMultipathServiceType
.NSURLSessionMultipathServiceTypeNone);
});
},
skip: Platform.isMacOS
? 'NSURLSessionConfiguration.multipathServiceType is not '
'supported on macOS'
: false);
test('networkServiceType', () {
expect(config.networkServiceType,
NSURLRequestNetworkServiceType.NSURLNetworkServiceTypeDefault);
Expand Down
22 changes: 11 additions & 11 deletions pkgs/cupertino_http/example/integration_test/utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ void main() {

group('stringNSDictionaryToMap', () {
test('empty input', () {
final d = objc.NSMutableDictionary.new1();
final d = objc.NSMutableDictionary();

expect(stringNSDictionaryToMap(d), <String, String>{});
});

test('single string input', () {
final d = objc.NSMutableDictionary.new1()
final d = objc.NSMutableDictionary()
..setObject_forKey_('value'.toNSString(), 'key'.toNSString());

expect(stringNSDictionaryToMap(d), {'key': 'value'});
});

test('multiple string input', () {
final d = objc.NSMutableDictionary.new1()
final d = objc.NSMutableDictionary()
..setObject_forKey_('value1'.toNSString(), 'key1'.toNSString())
..setObject_forKey_('value2'.toNSString(), 'key2'.toNSString())
..setObject_forKey_('value3'.toNSString(), 'key3'.toNSString());
Expand All @@ -34,14 +34,14 @@ void main() {
});

test('non-string value', () {
final d = objc.NSMutableDictionary.new1()
final d = objc.NSMutableDictionary()
..setObject_forKey_(
objc.NSNumberCreation.numberWithInteger_(5), 'key'.toNSString());
expect(() => stringNSDictionaryToMap(d), throwsUnsupportedError);
});

test('non-string key', () {
final d = objc.NSMutableDictionary.new1()
final d = objc.NSMutableDictionary()
..setObject_forKey_(
'value'.toNSString(), objc.NSNumberCreation.numberWithInteger_(5));
expect(() => stringNSDictionaryToMap(d), throwsUnsupportedError);
Expand All @@ -57,17 +57,17 @@ void main() {
test('single string input', () {
final array = stringIterableToNSArray(['apple']);
expect(array.count, 1);
expect(
objc.NSString.castFrom(array.objectAtIndex_(0)).toString(), 'apple');
expect(objc.NSString.castFrom(array.objectAtIndex_(0)).toDartString(),
'apple');
});

test('multiple string input', () {
final array = stringIterableToNSArray(['apple', 'banana']);
expect(array.count, 2);
expect(
objc.NSString.castFrom(array.objectAtIndex_(0)).toString(), 'apple');
expect(
objc.NSString.castFrom(array.objectAtIndex_(1)).toString(), 'banana');
expect(objc.NSString.castFrom(array.objectAtIndex_(0)).toDartString(),
'apple');
expect(objc.NSString.castFrom(array.objectAtIndex_(1)).toDartString(),
'banana');
});
});
}
8 changes: 4 additions & 4 deletions pkgs/cupertino_http/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/objective_c/ios"

SPEC CHECKSUMS:
cupertino_http: 947a233f40cfea55167a49f2facc18434ea117ba
cupertino_http: 94ac07f5ff090b8effa6c5e2c47871d48ab7c86c
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
objective_c: 77e887b5ba1827970907e10e832eec1683f3431d
integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
objective_c: 89e720c30d716b036faf9c9684022048eee1eee2

PODFILE CHECKSUM: d2243213672c3c48aae53c36642ba411a6be7309

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
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: ^4.0.0
objective_c: ^7.0.0
test: ^1.21.1
web_socket_conformance_tests:
path: ../../web_socket_conformance_tests/
Expand Down
Loading
Loading