From 3326df9171f43cd530c0b38edfc62a4544f33264 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 8 Aug 2024 16:04:58 -0700 Subject: [PATCH 1/3] Use `sharedDarwinSource` --- .../Classes/CUPHTTPClientDelegate.m | 0 .../Classes/CUPHTTPCompletionHelper.m | 0 .../Classes/CUPHTTPForwardedDelegate.m | 0 .../CUPHTTPStreamToNSInputStreamAdapter.m | 0 .../{ios => darwin}/Classes/dart_api_dl.c | 0 .../{macos => darwin}/cupertino_http.podspec | 8 +++-- .../cupertino_http/ios/cupertino_http.podspec | 29 ------------------- .../macos/Classes/CUPHTTPClientDelegate.m | 1 - .../macos/Classes/CUPHTTPCompletionHelper.m | 1 - .../macos/Classes/CUPHTTPForwardedDelegate.m | 1 - .../CUPHTTPStreamToNSInputStreamAdapter.m | 1 - .../macos/Classes/dart_api_dl.c | 1 - pkgs/cupertino_http/pubspec.yaml | 2 ++ 13 files changed, 7 insertions(+), 37 deletions(-) rename pkgs/cupertino_http/{ios => darwin}/Classes/CUPHTTPClientDelegate.m (100%) rename pkgs/cupertino_http/{ios => darwin}/Classes/CUPHTTPCompletionHelper.m (100%) rename pkgs/cupertino_http/{ios => darwin}/Classes/CUPHTTPForwardedDelegate.m (100%) rename pkgs/cupertino_http/{ios => darwin}/Classes/CUPHTTPStreamToNSInputStreamAdapter.m (100%) rename pkgs/cupertino_http/{ios => darwin}/Classes/dart_api_dl.c (100%) rename pkgs/cupertino_http/{macos => darwin}/cupertino_http.podspec (86%) delete mode 100644 pkgs/cupertino_http/ios/cupertino_http.podspec delete mode 100644 pkgs/cupertino_http/macos/Classes/CUPHTTPClientDelegate.m delete mode 100644 pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m delete mode 100644 pkgs/cupertino_http/macos/Classes/CUPHTTPForwardedDelegate.m delete mode 100644 pkgs/cupertino_http/macos/Classes/CUPHTTPStreamToNSInputStreamAdapter.m delete mode 100644 pkgs/cupertino_http/macos/Classes/dart_api_dl.c diff --git a/pkgs/cupertino_http/ios/Classes/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/darwin/Classes/CUPHTTPClientDelegate.m similarity index 100% rename from pkgs/cupertino_http/ios/Classes/CUPHTTPClientDelegate.m rename to pkgs/cupertino_http/darwin/Classes/CUPHTTPClientDelegate.m diff --git a/pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/darwin/Classes/CUPHTTPCompletionHelper.m similarity index 100% rename from pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m rename to pkgs/cupertino_http/darwin/Classes/CUPHTTPCompletionHelper.m diff --git a/pkgs/cupertino_http/ios/Classes/CUPHTTPForwardedDelegate.m b/pkgs/cupertino_http/darwin/Classes/CUPHTTPForwardedDelegate.m similarity index 100% rename from pkgs/cupertino_http/ios/Classes/CUPHTTPForwardedDelegate.m rename to pkgs/cupertino_http/darwin/Classes/CUPHTTPForwardedDelegate.m diff --git a/pkgs/cupertino_http/ios/Classes/CUPHTTPStreamToNSInputStreamAdapter.m b/pkgs/cupertino_http/darwin/Classes/CUPHTTPStreamToNSInputStreamAdapter.m similarity index 100% rename from pkgs/cupertino_http/ios/Classes/CUPHTTPStreamToNSInputStreamAdapter.m rename to pkgs/cupertino_http/darwin/Classes/CUPHTTPStreamToNSInputStreamAdapter.m diff --git a/pkgs/cupertino_http/ios/Classes/dart_api_dl.c b/pkgs/cupertino_http/darwin/Classes/dart_api_dl.c similarity index 100% rename from pkgs/cupertino_http/ios/Classes/dart_api_dl.c rename to pkgs/cupertino_http/darwin/Classes/dart_api_dl.c diff --git a/pkgs/cupertino_http/macos/cupertino_http.podspec b/pkgs/cupertino_http/darwin/cupertino_http.podspec similarity index 86% rename from pkgs/cupertino_http/macos/cupertino_http.podspec rename to pkgs/cupertino_http/darwin/cupertino_http.podspec index 86b7201978..c3e47bac03 100644 --- a/pkgs/cupertino_http/macos/cupertino_http.podspec +++ b/pkgs/cupertino_http/darwin/cupertino_http.podspec @@ -18,11 +18,13 @@ Pod::Spec.new do |s| # paths, so Classes contains a forwarder C file that relatively imports # `../src/*` so that the C sources can be shared among all target platforms. s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.dependency 'FlutterMacOS' + s.source_files = 'Classes/**/*' + s.ios.dependency 'Flutter' + s.osx.dependency 'FlutterMacOS' + s.ios.deployment_target = '12.0' + s.osx.deployment_target = '10.14' s.requires_arc = [] - s.platform = :osx, '10.14' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } s.swift_version = '5.0' end diff --git a/pkgs/cupertino_http/ios/cupertino_http.podspec b/pkgs/cupertino_http/ios/cupertino_http.podspec deleted file mode 100644 index 4e2ce46f08..0000000000 --- a/pkgs/cupertino_http/ios/cupertino_http.podspec +++ /dev/null @@ -1,29 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint cupertino_http.podspec` to validate before publishing. -# -Pod::Spec.new do |s| - s.name = 'cupertino_http' - s.version = '0.0.1' - s.summary = 'Flutter Foundation URL Loading System' - s.description = <<-DESC - A Flutter plugin for accessing the Foundation URL Loading System. - DESC - s.homepage = 'https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http' - s.license = { :type => 'BSD', :file => '../LICENSE' } - s.author = { 'TODO' => 'use-valid-author' } - - # This will ensure the source files in Classes/ are included in the native - # builds of apps using this FFI plugin. Podspec does not support relative - # paths, so Classes contains a forwarder C file that relatively imports - # `../src/*` so that the C sources can be shared among all target platforms. - s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.dependency 'Flutter' - s.platform = :ios, '12.0' - s.requires_arc = [] - - # Flutter.framework does not contain a i386 slice. - s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } - s.swift_version = '5.0' -end diff --git a/pkgs/cupertino_http/macos/Classes/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/macos/Classes/CUPHTTPClientDelegate.m deleted file mode 100644 index 5b375ca3b4..0000000000 --- a/pkgs/cupertino_http/macos/Classes/CUPHTTPClientDelegate.m +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/CUPHTTPClientDelegate.m" diff --git a/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m deleted file mode 100644 index b05d1fc717..0000000000 --- a/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/CUPHTTPCompletionHelper.m" diff --git a/pkgs/cupertino_http/macos/Classes/CUPHTTPForwardedDelegate.m b/pkgs/cupertino_http/macos/Classes/CUPHTTPForwardedDelegate.m deleted file mode 100644 index 39c9e02729..0000000000 --- a/pkgs/cupertino_http/macos/Classes/CUPHTTPForwardedDelegate.m +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/CUPHTTPForwardedDelegate.m" diff --git a/pkgs/cupertino_http/macos/Classes/CUPHTTPStreamToNSInputStreamAdapter.m b/pkgs/cupertino_http/macos/Classes/CUPHTTPStreamToNSInputStreamAdapter.m deleted file mode 100644 index 46eb84ba89..0000000000 --- a/pkgs/cupertino_http/macos/Classes/CUPHTTPStreamToNSInputStreamAdapter.m +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/CUPHTTPStreamToNSInputStreamAdapter.m" diff --git a/pkgs/cupertino_http/macos/Classes/dart_api_dl.c b/pkgs/cupertino_http/macos/Classes/dart_api_dl.c deleted file mode 100644 index 023f80ab06..0000000000 --- a/pkgs/cupertino_http/macos/Classes/dart_api_dl.c +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/dart-sdk/include/dart_api_dl.c" diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 94a9da8d8c..358f84a344 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -27,5 +27,7 @@ flutter: platforms: ios: ffiPlugin: true + sharedDarwinSource: true macos: ffiPlugin: true + sharedDarwinSource: true From 5f25e8f7f3fb9c601039d16b0432b2e847009064 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 27 Aug 2024 13:48:15 -0700 Subject: [PATCH 2/3] Bumps --- pkgs/cupertino_http/CHANGELOG.md | 2 ++ pkgs/cupertino_http/pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 4cd4a5e8cd..f5486296bf 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.5.2 + ## 1.5.1 * Allow `1000` as a `code` argument in `CupertinoWebSocket.close`. diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 358f84a344..cff2546b3e 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cupertino_http -version: 1.5.1 +version: 1.5.2-wip description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. From d96390a4b4220c1d4621bf379147ba39beeb9ab8 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 27 Aug 2024 16:21:31 -0700 Subject: [PATCH 3/3] Update CHANGELOG.md --- pkgs/cupertino_http/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index f5486296bf..4667f6ab1f 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.5.2 +## 1.5.2-wip ## 1.5.1