From 0167b51e5fae866b7e166dea76c8e72a9d18ddb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Sharma?= <737941+loic-sharma@users.noreply.github.com> Date: Wed, 8 May 2024 11:24:41 -0700 Subject: [PATCH 1/5] [ios_platform_images] Add Swift Package Manager support (#6684) Adds Swift Package Manager support to `ios_platform_images`. This does not migrate the example app's Xcode project; the example app's Xcode project is migrated whenever you run it using the Flutter tool with the Swift Package Manager feature enabled. Fixes https://github.com/flutter/flutter/issues/146909 --- packages/ios_platform_images/CHANGELOG.md | 3 +- .../example/ios/Runner/AppDelegate.swift | 2 +- .../ios_platform_images/ios/Assets/.gitkeep | 0 .../ios/ios_platform_images.podspec | 3 +- .../ios/ios_platform_images/Package.swift | 28 +++++++++++++++++++ .../IosPlatformImagesPlugin.swift | 0 .../Resources/PrivacyInfo.xcprivacy | 0 .../UIImageIosPlatformImages.swift | 0 .../ios_platform_images}/messages.g.swift | 0 .../ios_platform_images/pigeons/messages.dart | 3 +- packages/ios_platform_images/pubspec.yaml | 2 +- 11 files changed, 36 insertions(+), 5 deletions(-) delete mode 100644 packages/ios_platform_images/ios/Assets/.gitkeep create mode 100644 packages/ios_platform_images/ios/ios_platform_images/Package.swift rename packages/ios_platform_images/ios/{Classes => ios_platform_images/Sources/ios_platform_images}/IosPlatformImagesPlugin.swift (100%) rename packages/ios_platform_images/ios/{ => ios_platform_images/Sources/ios_platform_images}/Resources/PrivacyInfo.xcprivacy (100%) rename packages/ios_platform_images/ios/{Classes => ios_platform_images/Sources/ios_platform_images}/UIImageIosPlatformImages.swift (100%) rename packages/ios_platform_images/ios/{Classes => ios_platform_images/Sources/ios_platform_images}/messages.g.swift (100%) diff --git a/packages/ios_platform_images/CHANGELOG.md b/packages/ios_platform_images/CHANGELOG.md index 5b4c76c6098d..e85c36769902 100644 --- a/packages/ios_platform_images/CHANGELOG.md +++ b/packages/ios_platform_images/CHANGELOG.md @@ -1,6 +1,7 @@ -## NEXT +## 0.2.4 * Updates minimum iOS version to 12.0 and minimum Flutter version to 3.16.6. +* Adds Swift Package Manager compatibility. ## 0.2.3+2 diff --git a/packages/ios_platform_images/example/ios/Runner/AppDelegate.swift b/packages/ios_platform_images/example/ios/Runner/AppDelegate.swift index d83c0ff0beea..4580c8e76da4 100644 --- a/packages/ios_platform_images/example/ios/Runner/AppDelegate.swift +++ b/packages/ios_platform_images/example/ios/Runner/AppDelegate.swift @@ -5,7 +5,7 @@ import Flutter import UIKit -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/packages/ios_platform_images/ios/Assets/.gitkeep b/packages/ios_platform_images/ios/Assets/.gitkeep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/ios_platform_images/ios/ios_platform_images.podspec b/packages/ios_platform_images/ios/ios_platform_images.podspec index bb9574e42607..cbe750ced4ad 100644 --- a/packages/ios_platform_images/ios/ios_platform_images.podspec +++ b/packages/ios_platform_images/ios/ios_platform_images.podspec @@ -16,6 +16,7 @@ Downloaded by pub (not CocoaPods). s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/ios_platform_images' } s.documentation_url = 'https://pub.dev/packages/ios_platform_images' s.source_files = 'Classes/**/*.swift' + s.source_files = 'ios_platform_images/Sources/ios_platform_images/**/*.swift' s.dependency 'Flutter' s.platform = :ios, '12.0' @@ -25,5 +26,5 @@ Downloaded by pub (not CocoaPods). 'LD_RUNPATH_SEARCH_PATHS' => '/usr/lib/swift', } s.swift_version = '5.0' - s.resource_bundles = {'ios_platform_images_privacy' => ['Resources/PrivacyInfo.xcprivacy']} + s.resource_bundles = {'ios_platform_images_privacy' => ['ios_platform_images/Sources/ios_platform_images/Resources/PrivacyInfo.xcprivacy']} end diff --git a/packages/ios_platform_images/ios/ios_platform_images/Package.swift b/packages/ios_platform_images/ios/ios_platform_images/Package.swift new file mode 100644 index 000000000000..b594a5a8d604 --- /dev/null +++ b/packages/ios_platform_images/ios/ios_platform_images/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import PackageDescription + +let package = Package( + name: "ios_platform_images", + platforms: [ + .iOS("12.0") + ], + products: [ + .library(name: "ios-platform-images", targets: ["ios_platform_images"]) + ], + dependencies: [], + targets: [ + .target( + name: "ios_platform_images", + dependencies: [], + resources: [ + .process("Resources") + ] + ) + ] +) diff --git a/packages/ios_platform_images/ios/Classes/IosPlatformImagesPlugin.swift b/packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/IosPlatformImagesPlugin.swift similarity index 100% rename from packages/ios_platform_images/ios/Classes/IosPlatformImagesPlugin.swift rename to packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/IosPlatformImagesPlugin.swift diff --git a/packages/ios_platform_images/ios/Resources/PrivacyInfo.xcprivacy b/packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/Resources/PrivacyInfo.xcprivacy similarity index 100% rename from packages/ios_platform_images/ios/Resources/PrivacyInfo.xcprivacy rename to packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/Resources/PrivacyInfo.xcprivacy diff --git a/packages/ios_platform_images/ios/Classes/UIImageIosPlatformImages.swift b/packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/UIImageIosPlatformImages.swift similarity index 100% rename from packages/ios_platform_images/ios/Classes/UIImageIosPlatformImages.swift rename to packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/UIImageIosPlatformImages.swift diff --git a/packages/ios_platform_images/ios/Classes/messages.g.swift b/packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/messages.g.swift similarity index 100% rename from packages/ios_platform_images/ios/Classes/messages.g.swift rename to packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/messages.g.swift diff --git a/packages/ios_platform_images/pigeons/messages.dart b/packages/ios_platform_images/pigeons/messages.dart index 36cd9931e5bd..f45a914e19ac 100644 --- a/packages/ios_platform_images/pigeons/messages.dart +++ b/packages/ios_platform_images/pigeons/messages.dart @@ -6,7 +6,8 @@ import 'package:pigeon/pigeon.dart'; @ConfigurePigeon(PigeonOptions( dartOut: 'lib/src/messages.g.dart', - swiftOut: 'ios/Classes/messages.g.swift', + swiftOut: + 'ios/ios_platform_images/Sources/ios_platform_messages/messages.g.swift', copyrightHeader: 'pigeons/copyright.txt', )) diff --git a/packages/ios_platform_images/pubspec.yaml b/packages/ios_platform_images/pubspec.yaml index 7500447d9159..e17ed82f26c2 100644 --- a/packages/ios_platform_images/pubspec.yaml +++ b/packages/ios_platform_images/pubspec.yaml @@ -2,7 +2,7 @@ name: ios_platform_images description: A plugin to share images between Flutter and iOS in add-to-app setups. repository: https://github.com/flutter/packages/tree/main/packages/ios_platform_images issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+ios_platform_images%22 -version: 0.2.3+2 +version: 0.2.4 environment: sdk: ^3.2.3 From 09a373f2117cbb56f48b8488af284b5cf42448f6 Mon Sep 17 00:00:00 2001 From: Victoria Ashworth <15619084+vashworth@users.noreply.github.com> Date: Wed, 8 May 2024 13:27:33 -0500 Subject: [PATCH 2/5] [video_player_avfoundation] Adds Swift Package Manager compatibility (#6675) Makes `video_player_avfoundation` available as a Swift Package to Flutter. Also, remains compatible with CocoaPods. Fixes https://github.com/flutter/flutter/issues/146921. Redo of https://github.com/flutter/packages/pull/6634. --- .../video_player_avfoundation/CHANGELOG.md | 4 ++ .../darwin/video_player_avfoundation.podspec | 10 ++-- .../video_player_avfoundation/Package.swift | 46 +++++++++++++++++++ .../AVAssetTrackUtils.m | 0 .../FVPVideoPlayerPlugin.m | 6 +-- .../Resources/PrivacyInfo.xcprivacy | 0 .../AVAssetTrackUtils.h | 0 .../FVPDisplayLink.h | 0 .../FVPVideoPlayerPlugin.h | 0 .../FVPVideoPlayerPlugin_Test.h | 0 .../video_player_avfoundation}/messages.g.h | 0 .../video_player_avfoundation}/messages.g.m | 2 +- .../FVPDisplayLink.m | 2 +- .../include/.gitkeep | 0 .../FVPDisplayLink.m | 2 +- .../include/.gitkeep | 0 .../example/ios/Podfile | 1 - .../ios/Runner.xcodeproj/project.pbxproj | 27 +++++++++++ .../xcshareddata/swiftpm/Package.resolved | 13 ++++++ .../xcshareddata/swiftpm/Package.resolved | 13 ++++++ .../example/macos/Podfile | 1 - .../macos/Runner.xcodeproj/project.pbxproj | 27 +++++++++++ .../xcshareddata/swiftpm/Package.resolved | 13 ++++++ .../xcshareddata/swiftpm/Package.resolved | 13 ++++++ .../example/macos/Runner/AppDelegate.swift | 2 +- .../pigeons/messages.dart | 7 ++- .../video_player_avfoundation/pubspec.yaml | 2 +- 27 files changed, 174 insertions(+), 17 deletions(-) create mode 100644 packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Package.swift rename packages/video_player/video_player_avfoundation/darwin/{Classes => video_player_avfoundation/Sources/video_player_avfoundation}/AVAssetTrackUtils.m (100%) rename packages/video_player/video_player_avfoundation/darwin/{Classes => video_player_avfoundation/Sources/video_player_avfoundation}/FVPVideoPlayerPlugin.m (99%) rename packages/video_player/video_player_avfoundation/darwin/{ => video_player_avfoundation/Sources/video_player_avfoundation}/Resources/PrivacyInfo.xcprivacy (100%) rename packages/video_player/video_player_avfoundation/darwin/{Classes => video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation}/AVAssetTrackUtils.h (100%) rename packages/video_player/video_player_avfoundation/darwin/{Classes => video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation}/FVPDisplayLink.h (100%) rename packages/video_player/video_player_avfoundation/darwin/{Classes => video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation}/FVPVideoPlayerPlugin.h (100%) rename packages/video_player/video_player_avfoundation/darwin/{Classes => video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation}/FVPVideoPlayerPlugin_Test.h (100%) rename packages/video_player/video_player_avfoundation/darwin/{Classes => video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation}/messages.g.h (100%) rename packages/video_player/video_player_avfoundation/darwin/{Classes => video_player_avfoundation/Sources/video_player_avfoundation}/messages.g.m (99%) rename packages/video_player/video_player_avfoundation/darwin/{Classes/ios => video_player_avfoundation/Sources/video_player_avfoundation_ios}/FVPDisplayLink.m (95%) create mode 100644 packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_ios/include/.gitkeep rename packages/video_player/video_player_avfoundation/darwin/{Classes/macos => video_player_avfoundation/Sources/video_player_avfoundation_macos}/FVPDisplayLink.m (97%) create mode 100644 packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/include/.gitkeep create mode 100644 packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 packages/video_player/video_player_avfoundation/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/packages/video_player/video_player_avfoundation/CHANGELOG.md b/packages/video_player/video_player_avfoundation/CHANGELOG.md index 80078f24cc4a..b9b80aa49dbf 100644 --- a/packages/video_player/video_player_avfoundation/CHANGELOG.md +++ b/packages/video_player/video_player_avfoundation/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.6.0 + +* Adds Swift Package Manager compatibility. + ## 2.5.7 * Adds frame availability checks on iOS. diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation.podspec b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation.podspec index 50b4b2b5baf7..81e8d2f8e4ef 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation.podspec +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation.podspec @@ -14,14 +14,14 @@ Downloaded by pub (not CocoaPods). s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/video_player/video_player_avfoundation' } s.documentation_url = 'https://pub.dev/packages/video_player' - s.source_files = 'Classes/*' - s.ios.source_files = 'Classes/ios/*' - s.osx.source_files = 'Classes/macos/*' - s.public_header_files = 'Classes/**/*.h' + s.source_files = 'video_player_avfoundation/Sources/video_player_avfoundation/**/*.{h,m}' + s.ios.source_files = 'video_player_avfoundation/Sources/video_player_avfoundation_ios/*' + s.osx.source_files = 'video_player_avfoundation/Sources/video_player_avfoundation_macos/*' + s.public_header_files = 'video_player_avfoundation/Sources/video_player_avfoundation/include/**/*.h' s.ios.dependency 'Flutter' s.osx.dependency 'FlutterMacOS' s.ios.deployment_target = '12.0' s.osx.deployment_target = '10.14' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } - s.resource_bundles = {'video_player_avfoundation_privacy' => ['Resources/PrivacyInfo.xcprivacy']} + s.resource_bundles = {'video_player_avfoundation_privacy' => ['video_player_avfoundation/Sources/video_player_avfoundation/Resources/PrivacyInfo.xcprivacy']} end diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Package.swift b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Package.swift new file mode 100644 index 000000000000..32bd171e33e4 --- /dev/null +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Package.swift @@ -0,0 +1,46 @@ +// swift-tools-version: 5.9 + +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import PackageDescription + +let package = Package( + name: "video_player_avfoundation", + platforms: [ + .iOS("12.0"), + .macOS("10.14"), + ], + products: [ + .library(name: "video-player-avfoundation", targets: ["video_player_avfoundation"]) + ], + dependencies: [], + targets: [ + .target( + name: "video_player_avfoundation", + dependencies: [ + .target(name: "video_player_avfoundation_ios", condition: .when(platforms: [.iOS])), + .target(name: "video_player_avfoundation_macos", condition: .when(platforms: [.macOS])), + ], + resources: [ + .process("Resources") + ], + cSettings: [ + .headerSearchPath("include/video_player_avfoundation") + ] + ), + .target( + name: "video_player_avfoundation_ios", + cSettings: [ + .headerSearchPath("../video_player_avfoundation/include/video_player_avfoundation") + ] + ), + .target( + name: "video_player_avfoundation_macos", + cSettings: [ + .headerSearchPath("../video_player_avfoundation/include/video_player_avfoundation") + ] + ), + ] +) diff --git a/packages/video_player/video_player_avfoundation/darwin/Classes/AVAssetTrackUtils.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/AVAssetTrackUtils.m similarity index 100% rename from packages/video_player/video_player_avfoundation/darwin/Classes/AVAssetTrackUtils.m rename to packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/AVAssetTrackUtils.m diff --git a/packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayerPlugin.m similarity index 99% rename from packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin.m rename to packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayerPlugin.m index 8c76cb158799..14ee7ccefde2 100644 --- a/packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayerPlugin.m @@ -8,9 +8,9 @@ #import #import -#import "AVAssetTrackUtils.h" -#import "FVPDisplayLink.h" -#import "messages.g.h" +#import "./include/video_player_avfoundation/AVAssetTrackUtils.h" +#import "./include/video_player_avfoundation/FVPDisplayLink.h" +#import "./include/video_player_avfoundation/messages.g.h" #if !__has_feature(objc_arc) #error Code Requires ARC. diff --git a/packages/video_player/video_player_avfoundation/darwin/Resources/PrivacyInfo.xcprivacy b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/Resources/PrivacyInfo.xcprivacy similarity index 100% rename from packages/video_player/video_player_avfoundation/darwin/Resources/PrivacyInfo.xcprivacy rename to packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/Resources/PrivacyInfo.xcprivacy diff --git a/packages/video_player/video_player_avfoundation/darwin/Classes/AVAssetTrackUtils.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/AVAssetTrackUtils.h similarity index 100% rename from packages/video_player/video_player_avfoundation/darwin/Classes/AVAssetTrackUtils.h rename to packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/AVAssetTrackUtils.h diff --git a/packages/video_player/video_player_avfoundation/darwin/Classes/FVPDisplayLink.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h similarity index 100% rename from packages/video_player/video_player_avfoundation/darwin/Classes/FVPDisplayLink.h rename to packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h diff --git a/packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin.h similarity index 100% rename from packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin.h rename to packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin.h diff --git a/packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin_Test.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin_Test.h similarity index 100% rename from packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin_Test.h rename to packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin_Test.h diff --git a/packages/video_player/video_player_avfoundation/darwin/Classes/messages.g.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h similarity index 100% rename from packages/video_player/video_player_avfoundation/darwin/Classes/messages.g.h rename to packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h diff --git a/packages/video_player/video_player_avfoundation/darwin/Classes/messages.g.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m similarity index 99% rename from packages/video_player/video_player_avfoundation/darwin/Classes/messages.g.m rename to packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m index 97b408b53be4..1e2354d88289 100644 --- a/packages/video_player/video_player_avfoundation/darwin/Classes/messages.g.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m @@ -4,7 +4,7 @@ // Autogenerated from Pigeon (v18.0.0), do not edit directly. // See also: https://pub.dev/packages/pigeon -#import "messages.g.h" +#import "./include/video_player_avfoundation/messages.g.h" #if TARGET_OS_OSX #import diff --git a/packages/video_player/video_player_avfoundation/darwin/Classes/ios/FVPDisplayLink.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_ios/FVPDisplayLink.m similarity index 95% rename from packages/video_player/video_player_avfoundation/darwin/Classes/ios/FVPDisplayLink.m rename to packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_ios/FVPDisplayLink.m index 505001bc223f..9bdb321ae164 100644 --- a/packages/video_player/video_player_avfoundation/darwin/Classes/ios/FVPDisplayLink.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_ios/FVPDisplayLink.m @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import "../FVPDisplayLink.h" +#import "../video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h" #import #import diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_ios/include/.gitkeep b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_ios/include/.gitkeep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/packages/video_player/video_player_avfoundation/darwin/Classes/macos/FVPDisplayLink.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/FVPDisplayLink.m similarity index 97% rename from packages/video_player/video_player_avfoundation/darwin/Classes/macos/FVPDisplayLink.m rename to packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/FVPDisplayLink.m index 3904c8a288af..cd5670fa5a37 100644 --- a/packages/video_player/video_player_avfoundation/darwin/Classes/macos/FVPDisplayLink.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/FVPDisplayLink.m @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import "../FVPDisplayLink.h" +#import "../video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h" #import #import diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/include/.gitkeep b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/include/.gitkeep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/packages/video_player/video_player_avfoundation/example/ios/Podfile b/packages/video_player/video_player_avfoundation/example/ios/Podfile index 3278285d9d7a..c9339a034ebe 100644 --- a/packages/video_player/video_player_avfoundation/example/ios/Podfile +++ b/packages/video_player/video_player_avfoundation/example/ios/Podfile @@ -31,7 +31,6 @@ target 'Runner' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do inherit! :search_paths - pod 'OCMock', '3.9.1' end end diff --git a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj index feb1ba462cc6..0f6dd7a79dae 100644 --- a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj @@ -9,6 +9,7 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 78CF8D742BC5CEA80051231B /* OCMock in Frameworks */ = {isa = PBXBuildFile; productRef = 78CF8D732BC5CEA80051231B /* OCMock */; }; 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; @@ -99,6 +100,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 78CF8D742BC5CEA80051231B /* OCMock in Frameworks */, D182ECB59C06DBC7E2D5D913 /* libPods-RunnerTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -260,6 +262,9 @@ F7151F4026603ECA0028CB91 /* PBXTargetDependency */, ); name = RunnerTests; + packageProductDependencies = ( + 78CF8D732BC5CEA80051231B /* OCMock */, + ); productName = RunnerTests; productReference = F7151F3A26603ECA0028CB91 /* RunnerTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -297,6 +302,9 @@ Base, ); mainGroup = 97C146E51CF9000F007C117D; + packageReferences = ( + 78CF8D722BC5CEA80051231B /* XCRemoteSwiftPackageReference "ocmock" */, + ); productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; projectRoot = ""; @@ -758,6 +766,25 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 78CF8D722BC5CEA80051231B /* XCRemoteSwiftPackageReference "ocmock" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/erikdoe/ocmock"; + requirement = { + kind = revision; + revision = ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 78CF8D732BC5CEA80051231B /* OCMock */ = { + isa = XCSwiftPackageProductDependency; + package = 78CF8D722BC5CEA80051231B /* XCRemoteSwiftPackageReference "ocmock" */; + productName = OCMock; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 97C146E61CF9000F007C117D /* Project object */; } diff --git a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000000..69f8d7acc40b --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,13 @@ +{ + "pins" : [ + { + "identity" : "ocmock", + "kind" : "remoteSourceControl", + "location" : "https://github.com/erikdoe/ocmock", + "state" : { + "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" + } + } + ], + "version" : 2 +} diff --git a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000000..69f8d7acc40b --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,13 @@ +{ + "pins" : [ + { + "identity" : "ocmock", + "kind" : "remoteSourceControl", + "location" : "https://github.com/erikdoe/ocmock", + "state" : { + "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" + } + } + ], + "version" : 2 +} diff --git a/packages/video_player/video_player_avfoundation/example/macos/Podfile b/packages/video_player/video_player_avfoundation/example/macos/Podfile index c0f5d7877b98..c795730db8ed 100644 --- a/packages/video_player/video_player_avfoundation/example/macos/Podfile +++ b/packages/video_player/video_player_avfoundation/example/macos/Podfile @@ -33,7 +33,6 @@ target 'Runner' do flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do inherit! :search_paths - pod 'OCMock', '3.9.1' end end diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj index 5159838815f7..dc593db1307d 100644 --- a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj @@ -28,6 +28,7 @@ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + 78CF8D772BC5D0140051231B /* OCMock in Frameworks */ = {isa = PBXBuildFile; productRef = 78CF8D762BC5D0140051231B /* OCMock */; }; C000184E56E3386C22EF683A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC60543320154AF9A465D416 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ @@ -95,6 +96,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 78CF8D772BC5D0140051231B /* OCMock in Frameworks */, 18AD5E2A5B24DAFCF3749529 /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -226,6 +228,9 @@ 331C80DA294CF71000263BE5 /* PBXTargetDependency */, ); name = RunnerTests; + packageProductDependencies = ( + 78CF8D762BC5D0140051231B /* OCMock */, + ); productName = RunnerTests; productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -292,6 +297,9 @@ Base, ); mainGroup = 33CC10E42044A3C60003C045; + packageReferences = ( + 78CF8D752BC5D0140051231B /* XCRemoteSwiftPackageReference "ocmock" */, + ); productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -808,6 +816,25 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 78CF8D752BC5D0140051231B /* XCRemoteSwiftPackageReference "ocmock" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/erikdoe/ocmock"; + requirement = { + kind = revision; + revision = ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 78CF8D762BC5D0140051231B /* OCMock */ = { + isa = XCSwiftPackageProductDependency; + package = 78CF8D752BC5D0140051231B /* XCRemoteSwiftPackageReference "ocmock" */; + productName = OCMock; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 33CC10E52044A3C60003C045 /* Project object */; } diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000000..69f8d7acc40b --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,13 @@ +{ + "pins" : [ + { + "identity" : "ocmock", + "kind" : "remoteSourceControl", + "location" : "https://github.com/erikdoe/ocmock", + "state" : { + "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" + } + } + ], + "version" : 2 +} diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000000..69f8d7acc40b --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,13 @@ +{ + "pins" : [ + { + "identity" : "ocmock", + "kind" : "remoteSourceControl", + "location" : "https://github.com/erikdoe/ocmock", + "state" : { + "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" + } + } + ], + "version" : 2 +} diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/AppDelegate.swift b/packages/video_player/video_player_avfoundation/example/macos/Runner/AppDelegate.swift index 5cec4c48f620..689c0ecd5254 100644 --- a/packages/video_player/video_player_avfoundation/example/macos/Runner/AppDelegate.swift +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner/AppDelegate.swift @@ -5,7 +5,7 @@ import Cocoa import FlutterMacOS -@NSApplicationMain +@main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true diff --git a/packages/video_player/video_player_avfoundation/pigeons/messages.dart b/packages/video_player/video_player_avfoundation/pigeons/messages.dart index 1f9795360c30..8dbda80bd550 100644 --- a/packages/video_player/video_player_avfoundation/pigeons/messages.dart +++ b/packages/video_player/video_player_avfoundation/pigeons/messages.dart @@ -7,10 +7,13 @@ import 'package:pigeon/pigeon.dart'; @ConfigurePigeon(PigeonOptions( dartOut: 'lib/src/messages.g.dart', dartTestOut: 'test/test_api.g.dart', - objcHeaderOut: 'darwin/Classes/messages.g.h', - objcSourceOut: 'darwin/Classes/messages.g.m', + objcHeaderOut: + 'darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h', + objcSourceOut: + 'darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m', objcOptions: ObjcOptions( prefix: 'FVP', + headerIncludePath: './include/video_player_avfoundation/messages.g.h', ), copyrightHeader: 'pigeons/copyright.txt', )) diff --git a/packages/video_player/video_player_avfoundation/pubspec.yaml b/packages/video_player/video_player_avfoundation/pubspec.yaml index 121d3a7a1aa0..f3f97767216f 100644 --- a/packages/video_player/video_player_avfoundation/pubspec.yaml +++ b/packages/video_player/video_player_avfoundation/pubspec.yaml @@ -2,7 +2,7 @@ name: video_player_avfoundation description: iOS and macOS implementation of the video_player plugin. repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_avfoundation issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 -version: 2.5.7 +version: 2.6.0 environment: sdk: ^3.2.3 From a444af56dd267989964346a7270a045b2da5fba3 Mon Sep 17 00:00:00 2001 From: Victoria Ashworth <15619084+vashworth@users.noreply.github.com> Date: Wed, 8 May 2024 14:06:22 -0500 Subject: [PATCH 3/5] [image_picker_ios] Adds Swift Package Manager compatibility to image_picker_ios (#6617) Makes `image_picker_ios` available as a Swift Package to Flutter. Also, remains compatible with CocoaPods. Fixes https://github.com/flutter/flutter/issues/146919. --- .../image_picker_ios/CHANGELOG.md | 4 +++ .../image_picker_ios/example/ios/Podfile | 2 -- .../ios/Runner.xcodeproj/project.pbxproj | 29 ++++++++++++++++- .../xcshareddata/swiftpm/Package.resolved | 13 ++++++++ .../xcshareddata/swiftpm/Package.resolved | 13 ++++++++ .../image_picker_ios/ios/Assets/.gitkeep | 0 .../ios/image_picker_ios.podspec | 8 ++--- .../ios/image_picker_ios/Package.swift | 31 +++++++++++++++++++ .../FLTImagePickerImageUtil.h | 0 .../FLTImagePickerImageUtil.m | 0 .../FLTImagePickerMetaDataUtil.h | 0 .../FLTImagePickerMetaDataUtil.m | 0 .../FLTImagePickerPhotoAssetUtil.h | 0 .../FLTImagePickerPhotoAssetUtil.m | 0 .../image_picker_ios}/FLTImagePickerPlugin.m | 0 .../FLTImagePickerPlugin_Test.h | 0 .../FLTPHPickerSaveImageToPathOperation.h | 0 .../FLTPHPickerSaveImageToPathOperation.m | 0 .../Resources/PrivacyInfo.xcprivacy | 0 .../include}/ImagePickerPlugin.modulemap | 0 .../include}/image_picker_ios-umbrella.h | 0 .../image_picker_ios}/FLTImagePickerPlugin.h | 0 .../image_picker_ios/include/module.modulemap | 14 +++++++++ .../Sources/image_picker_ios}/messages.g.h | 0 .../Sources/image_picker_ios}/messages.g.m | 0 .../image_picker_ios/pigeons/messages.dart | 4 +-- .../image_picker_ios/pubspec.yaml | 2 +- 27 files changed, 110 insertions(+), 10 deletions(-) create mode 100644 packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 packages/image_picker/image_picker_ios/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100755 packages/image_picker/image_picker_ios/ios/Assets/.gitkeep create mode 100644 packages/image_picker/image_picker_ios/ios/image_picker_ios/Package.swift rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios}/FLTImagePickerImageUtil.h (100%) rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios}/FLTImagePickerImageUtil.m (100%) rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios}/FLTImagePickerMetaDataUtil.h (100%) rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios}/FLTImagePickerMetaDataUtil.m (100%) rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios}/FLTImagePickerPhotoAssetUtil.h (100%) rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios}/FLTImagePickerPhotoAssetUtil.m (100%) rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios}/FLTImagePickerPlugin.m (100%) rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios}/FLTImagePickerPlugin_Test.h (100%) rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios}/FLTPHPickerSaveImageToPathOperation.h (100%) rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios}/FLTPHPickerSaveImageToPathOperation.m (100%) rename packages/image_picker/image_picker_ios/ios/{ => image_picker_ios/Sources/image_picker_ios}/Resources/PrivacyInfo.xcprivacy (100%) rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios/include}/ImagePickerPlugin.modulemap (100%) rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios/include}/image_picker_ios-umbrella.h (100%) rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios/include/image_picker_ios}/FLTImagePickerPlugin.h (100%) create mode 100644 packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/module.modulemap rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios}/messages.g.h (100%) rename packages/image_picker/image_picker_ios/ios/{Classes => image_picker_ios/Sources/image_picker_ios}/messages.g.m (100%) diff --git a/packages/image_picker/image_picker_ios/CHANGELOG.md b/packages/image_picker/image_picker_ios/CHANGELOG.md index daff28555b81..259cc601dd22 100644 --- a/packages/image_picker/image_picker_ios/CHANGELOG.md +++ b/packages/image_picker/image_picker_ios/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.11 + +* Adds Swift Package Manager compatibility. + ## 0.8.10+1 * Fixes a possible crash when calling a picker method UIGraphicsImageRenderer if imageToScale is nil. diff --git a/packages/image_picker/image_picker_ios/example/ios/Podfile b/packages/image_picker/image_picker_ios/example/ios/Podfile index c5bd89706bc7..4ea56c9ad537 100644 --- a/packages/image_picker/image_picker_ios/example/ios/Podfile +++ b/packages/image_picker/image_picker_ios/example/ios/Podfile @@ -33,8 +33,6 @@ target 'Runner' do target 'RunnerTests' do platform :ios, '12.0' inherit! :search_paths - # Pods for testing - pod 'OCMock', '~> 3.8.1' end end diff --git a/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.pbxproj b/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.pbxproj index 82e6e009cb0f..8e004beddfa4 100644 --- a/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.pbxproj @@ -32,6 +32,7 @@ 7865C5FD294157BC0010E17F /* icnsImage.icns in Resources */ = {isa = PBXBuildFile; fileRef = 7865C5FB294157BB0010E17F /* icnsImage.icns */; }; 7865C5FF294252A60010E17F /* proRawImage.dng in Resources */ = {isa = PBXBuildFile; fileRef = 7865C5FE294252A60010E17F /* proRawImage.dng */; }; 7865C600294252A60010E17F /* proRawImage.dng in Resources */ = {isa = PBXBuildFile; fileRef = 7865C5FE294252A60010E17F /* proRawImage.dng */; }; + 78CF8D862BC5E7070051231B /* OCMock in Frameworks */ = {isa = PBXBuildFile; productRef = 78CF8D852BC5E7070051231B /* OCMock */; }; 86430DF9272D71E9002D9D6C /* gifImage.gif in Resources */ = {isa = PBXBuildFile; fileRef = 9FC8F0E8229FA49E00C8D58F /* gifImage.gif */; }; 86E9A893272754860017E6E0 /* PickerSaveImageToPathOperationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 86E9A892272754860017E6E0 /* PickerSaveImageToPathOperationTests.m */; }; 86E9A894272754A30017E6E0 /* webpImage.webp in Resources */ = {isa = PBXBuildFile; fileRef = 86E9A88F272747B90017E6E0 /* webpImage.webp */; }; @@ -129,6 +130,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 78CF8D862BC5E7070051231B /* OCMock in Frameworks */, 3A72BAD3FAE6E0FA9D80826B /* libPods-RunnerTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -291,6 +293,9 @@ 334733F82668136400DCC49E /* PBXTargetDependency */, ); name = RunnerTests; + packageProductDependencies = ( + 78CF8D852BC5E7070051231B /* OCMock */, + ); productName = RunnerTests; productReference = 334733F22668136400DCC49E /* RunnerTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -342,7 +347,7 @@ isa = PBXProject; attributes = { DefaultBuildSystemTypeForWorkspace = Original; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = "The Flutter Authors"; TargetAttributes = { 334733F12668136400DCC49E = { @@ -374,6 +379,9 @@ Base, ); mainGroup = 97C146E51CF9000F007C117D; + packageReferences = ( + 78CF8D842BC5E7070051231B /* XCRemoteSwiftPackageReference "ocmock" */, + ); productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; projectRoot = ""; @@ -879,6 +887,25 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 78CF8D842BC5E7070051231B /* XCRemoteSwiftPackageReference "ocmock" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/erikdoe/ocmock"; + requirement = { + kind = revision; + revision = ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 78CF8D852BC5E7070051231B /* OCMock */ = { + isa = XCSwiftPackageProductDependency; + package = 78CF8D842BC5E7070051231B /* XCRemoteSwiftPackageReference "ocmock" */; + productName = OCMock; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 97C146E61CF9000F007C117D /* Project object */; } diff --git a/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000000..69f8d7acc40b --- /dev/null +++ b/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,13 @@ +{ + "pins" : [ + { + "identity" : "ocmock", + "kind" : "remoteSourceControl", + "location" : "https://github.com/erikdoe/ocmock", + "state" : { + "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" + } + } + ], + "version" : 2 +} diff --git a/packages/image_picker/image_picker_ios/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/image_picker/image_picker_ios/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000000..69f8d7acc40b --- /dev/null +++ b/packages/image_picker/image_picker_ios/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,13 @@ +{ + "pins" : [ + { + "identity" : "ocmock", + "kind" : "remoteSourceControl", + "location" : "https://github.com/erikdoe/ocmock", + "state" : { + "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" + } + } + ], + "version" : 2 +} diff --git a/packages/image_picker/image_picker_ios/ios/Assets/.gitkeep b/packages/image_picker/image_picker_ios/ios/Assets/.gitkeep deleted file mode 100755 index e69de29bb2d1..000000000000 diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios.podspec b/packages/image_picker/image_picker_ios/ios/image_picker_ios.podspec index 4e4753835202..17ef1b968264 100644 --- a/packages/image_picker/image_picker_ios/ios/image_picker_ios.podspec +++ b/packages/image_picker/image_picker_ios/ios/image_picker_ios.podspec @@ -14,11 +14,11 @@ Downloaded by pub (not CocoaPods). s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/image_picker_ios' } s.documentation_url = 'https://pub.dev/packages/image_picker_ios' - s.source_files = 'Classes/**/*.{h,m}' - s.public_header_files = 'Classes/**/*.h' - s.module_map = 'Classes/ImagePickerPlugin.modulemap' + s.source_files = 'image_picker_ios/Sources/image_picker_ios/**/*.{h,m}' + s.public_header_files = 'image_picker_ios/Sources/image_picker_ios/**/*.h' + s.module_map = 'image_picker_ios/Sources/image_picker_ios/include/ImagePickerPlugin.modulemap' s.dependency 'Flutter' s.platform = :ios, '12.0' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } - s.resource_bundles = {'image_picker_ios_privacy' => ['Resources/PrivacyInfo.xcprivacy']} + s.resource_bundles = {'image_picker_ios_privacy' => ['image_picker_ios/Sources/image_picker_ios/Resources/PrivacyInfo.xcprivacy']} end diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Package.swift b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Package.swift new file mode 100644 index 000000000000..411869087159 --- /dev/null +++ b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Package.swift @@ -0,0 +1,31 @@ +// swift-tools-version: 5.9 + +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import PackageDescription + +let package = Package( + name: "image_picker_ios", + platforms: [ + .iOS("12.0") + ], + products: [ + .library(name: "image-picker-ios", targets: ["image_picker_ios"]) + ], + dependencies: [], + targets: [ + .target( + name: "image_picker_ios", + dependencies: [], + exclude: ["include/ImagePickerPlugin.modulemap"], + resources: [ + .process("Resources") + ], + cSettings: [ + .headerSearchPath("include/image_picker_ios") + ] + ) + ] +) diff --git a/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerImageUtil.h b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerImageUtil.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerImageUtil.h rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerImageUtil.h diff --git a/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerImageUtil.m b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerImageUtil.m similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerImageUtil.m rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerImageUtil.m diff --git a/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerMetaDataUtil.h b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerMetaDataUtil.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerMetaDataUtil.h rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerMetaDataUtil.h diff --git a/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerMetaDataUtil.m b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerMetaDataUtil.m similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerMetaDataUtil.m rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerMetaDataUtil.m diff --git a/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPhotoAssetUtil.h b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPhotoAssetUtil.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPhotoAssetUtil.h rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPhotoAssetUtil.h diff --git a/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPhotoAssetUtil.m b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPhotoAssetUtil.m similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPhotoAssetUtil.m rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPhotoAssetUtil.m diff --git a/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPlugin.m b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPlugin.m similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPlugin.m rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPlugin.m diff --git a/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPlugin_Test.h b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPlugin_Test.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPlugin_Test.h rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPlugin_Test.h diff --git a/packages/image_picker/image_picker_ios/ios/Classes/FLTPHPickerSaveImageToPathOperation.h b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTPHPickerSaveImageToPathOperation.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/FLTPHPickerSaveImageToPathOperation.h rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTPHPickerSaveImageToPathOperation.h diff --git a/packages/image_picker/image_picker_ios/ios/Classes/FLTPHPickerSaveImageToPathOperation.m b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTPHPickerSaveImageToPathOperation.m similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/FLTPHPickerSaveImageToPathOperation.m rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTPHPickerSaveImageToPathOperation.m diff --git a/packages/image_picker/image_picker_ios/ios/Resources/PrivacyInfo.xcprivacy b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/Resources/PrivacyInfo.xcprivacy similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Resources/PrivacyInfo.xcprivacy rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/Resources/PrivacyInfo.xcprivacy diff --git a/packages/image_picker/image_picker_ios/ios/Classes/ImagePickerPlugin.modulemap b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/ImagePickerPlugin.modulemap similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/ImagePickerPlugin.modulemap rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/ImagePickerPlugin.modulemap diff --git a/packages/image_picker/image_picker_ios/ios/Classes/image_picker_ios-umbrella.h b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios-umbrella.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/image_picker_ios-umbrella.h rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios-umbrella.h diff --git a/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPlugin.h b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerPlugin.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPlugin.h rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerPlugin.h diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/module.modulemap b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/module.modulemap new file mode 100644 index 000000000000..ca9c1c4d0322 --- /dev/null +++ b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/module.modulemap @@ -0,0 +1,14 @@ +module image_picker_ios { + umbrella header "image_picker_ios-umbrella.h" + + export * + module * { export * } + + explicit module Test { + header "../FLTImagePickerPlugin_Test.h" + header "../FLTImagePickerImageUtil.h" + header "../FLTImagePickerMetaDataUtil.h" + header "../FLTImagePickerPhotoAssetUtil.h" + header "../FLTPHPickerSaveImageToPathOperation.h" + } +} diff --git a/packages/image_picker/image_picker_ios/ios/Classes/messages.g.h b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/messages.g.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/messages.g.h rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/messages.g.h diff --git a/packages/image_picker/image_picker_ios/ios/Classes/messages.g.m b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/messages.g.m similarity index 100% rename from packages/image_picker/image_picker_ios/ios/Classes/messages.g.m rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/messages.g.m diff --git a/packages/image_picker/image_picker_ios/pigeons/messages.dart b/packages/image_picker/image_picker_ios/pigeons/messages.dart index d8ae8954e984..652389dc66fc 100644 --- a/packages/image_picker/image_picker_ios/pigeons/messages.dart +++ b/packages/image_picker/image_picker_ios/pigeons/messages.dart @@ -7,8 +7,8 @@ import 'package:pigeon/pigeon.dart'; @ConfigurePigeon(PigeonOptions( dartOut: 'lib/src/messages.g.dart', dartTestOut: 'test/test_api.g.dart', - objcHeaderOut: 'ios/Classes/messages.g.h', - objcSourceOut: 'ios/Classes/messages.g.m', + objcHeaderOut: 'ios/image_picker_ios/Sources/image_picker_ios/messages.g.h', + objcSourceOut: 'ios/image_picker_ios/Sources/image_picker_ios/messages.g.m', objcOptions: ObjcOptions( prefix: 'FLT', ), diff --git a/packages/image_picker/image_picker_ios/pubspec.yaml b/packages/image_picker/image_picker_ios/pubspec.yaml index d57e2b6ee7b8..00c33496cefd 100755 --- a/packages/image_picker/image_picker_ios/pubspec.yaml +++ b/packages/image_picker/image_picker_ios/pubspec.yaml @@ -2,7 +2,7 @@ name: image_picker_ios description: iOS implementation of the image_picker plugin. repository: https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker_ios issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22 -version: 0.8.10+1 +version: 0.8.11 environment: sdk: ^3.3.0 From a9f14bc819e635f43f1861b8da807ce03b7ce013 Mon Sep 17 00:00:00 2001 From: "auto-submit[bot]" <98614782+auto-submit[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 19:18:18 +0000 Subject: [PATCH 4/5] Reverts "[image_picker_ios] Adds Swift Package Manager compatibility to image_picker_ios (#6617)" (#6693) Reverts: flutter/packages#6617 Initiated by: vashworth Reason for reverting: Failing [Mac_arm64 ios_platform_tests_shard_1 master](https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64%20ios_platform_tests_shard_1%20master/1942/overview) Original PR Author: vashworth Reviewed By: {loic-sharma, stuartmorgan} This change reverts the following previous change: Makes `image_picker_ios` available as a Swift Package to Flutter. Also, remains compatible with CocoaPods. Fixes https://github.com/flutter/flutter/issues/146919. --- .../image_picker_ios/CHANGELOG.md | 4 --- .../image_picker_ios/example/ios/Podfile | 2 ++ .../ios/Runner.xcodeproj/project.pbxproj | 29 +---------------- .../xcshareddata/swiftpm/Package.resolved | 13 -------- .../xcshareddata/swiftpm/Package.resolved | 13 -------- .../image_picker_ios/ios/Assets/.gitkeep | 0 .../FLTImagePickerImageUtil.h | 0 .../FLTImagePickerImageUtil.m | 0 .../FLTImagePickerMetaDataUtil.h | 0 .../FLTImagePickerMetaDataUtil.m | 0 .../FLTImagePickerPhotoAssetUtil.h | 0 .../FLTImagePickerPhotoAssetUtil.m | 0 .../FLTImagePickerPlugin.h | 0 .../FLTImagePickerPlugin.m | 0 .../FLTImagePickerPlugin_Test.h | 0 .../FLTPHPickerSaveImageToPathOperation.h | 0 .../FLTPHPickerSaveImageToPathOperation.m | 0 .../ImagePickerPlugin.modulemap | 0 .../image_picker_ios-umbrella.h | 0 .../image_picker_ios => Classes}/messages.g.h | 0 .../image_picker_ios => Classes}/messages.g.m | 0 .../Resources/PrivacyInfo.xcprivacy | 0 .../ios/image_picker_ios.podspec | 8 ++--- .../ios/image_picker_ios/Package.swift | 31 ------------------- .../image_picker_ios/include/module.modulemap | 14 --------- .../image_picker_ios/pigeons/messages.dart | 4 +-- .../image_picker_ios/pubspec.yaml | 2 +- 27 files changed, 10 insertions(+), 110 deletions(-) delete mode 100644 packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100644 packages/image_picker/image_picker_ios/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100755 packages/image_picker/image_picker_ios/ios/Assets/.gitkeep rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios => Classes}/FLTImagePickerImageUtil.h (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios => Classes}/FLTImagePickerImageUtil.m (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios => Classes}/FLTImagePickerMetaDataUtil.h (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios => Classes}/FLTImagePickerMetaDataUtil.m (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios => Classes}/FLTImagePickerPhotoAssetUtil.h (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios => Classes}/FLTImagePickerPhotoAssetUtil.m (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios/include/image_picker_ios => Classes}/FLTImagePickerPlugin.h (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios => Classes}/FLTImagePickerPlugin.m (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios => Classes}/FLTImagePickerPlugin_Test.h (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios => Classes}/FLTPHPickerSaveImageToPathOperation.h (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios => Classes}/FLTPHPickerSaveImageToPathOperation.m (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios/include => Classes}/ImagePickerPlugin.modulemap (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios/include => Classes}/image_picker_ios-umbrella.h (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios => Classes}/messages.g.h (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios => Classes}/messages.g.m (100%) rename packages/image_picker/image_picker_ios/ios/{image_picker_ios/Sources/image_picker_ios => }/Resources/PrivacyInfo.xcprivacy (100%) delete mode 100644 packages/image_picker/image_picker_ios/ios/image_picker_ios/Package.swift delete mode 100644 packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/module.modulemap diff --git a/packages/image_picker/image_picker_ios/CHANGELOG.md b/packages/image_picker/image_picker_ios/CHANGELOG.md index 259cc601dd22..daff28555b81 100644 --- a/packages/image_picker/image_picker_ios/CHANGELOG.md +++ b/packages/image_picker/image_picker_ios/CHANGELOG.md @@ -1,7 +1,3 @@ -## 0.8.11 - -* Adds Swift Package Manager compatibility. - ## 0.8.10+1 * Fixes a possible crash when calling a picker method UIGraphicsImageRenderer if imageToScale is nil. diff --git a/packages/image_picker/image_picker_ios/example/ios/Podfile b/packages/image_picker/image_picker_ios/example/ios/Podfile index 4ea56c9ad537..c5bd89706bc7 100644 --- a/packages/image_picker/image_picker_ios/example/ios/Podfile +++ b/packages/image_picker/image_picker_ios/example/ios/Podfile @@ -33,6 +33,8 @@ target 'Runner' do target 'RunnerTests' do platform :ios, '12.0' inherit! :search_paths + # Pods for testing + pod 'OCMock', '~> 3.8.1' end end diff --git a/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.pbxproj b/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.pbxproj index 8e004beddfa4..82e6e009cb0f 100644 --- a/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.pbxproj @@ -32,7 +32,6 @@ 7865C5FD294157BC0010E17F /* icnsImage.icns in Resources */ = {isa = PBXBuildFile; fileRef = 7865C5FB294157BB0010E17F /* icnsImage.icns */; }; 7865C5FF294252A60010E17F /* proRawImage.dng in Resources */ = {isa = PBXBuildFile; fileRef = 7865C5FE294252A60010E17F /* proRawImage.dng */; }; 7865C600294252A60010E17F /* proRawImage.dng in Resources */ = {isa = PBXBuildFile; fileRef = 7865C5FE294252A60010E17F /* proRawImage.dng */; }; - 78CF8D862BC5E7070051231B /* OCMock in Frameworks */ = {isa = PBXBuildFile; productRef = 78CF8D852BC5E7070051231B /* OCMock */; }; 86430DF9272D71E9002D9D6C /* gifImage.gif in Resources */ = {isa = PBXBuildFile; fileRef = 9FC8F0E8229FA49E00C8D58F /* gifImage.gif */; }; 86E9A893272754860017E6E0 /* PickerSaveImageToPathOperationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 86E9A892272754860017E6E0 /* PickerSaveImageToPathOperationTests.m */; }; 86E9A894272754A30017E6E0 /* webpImage.webp in Resources */ = {isa = PBXBuildFile; fileRef = 86E9A88F272747B90017E6E0 /* webpImage.webp */; }; @@ -130,7 +129,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 78CF8D862BC5E7070051231B /* OCMock in Frameworks */, 3A72BAD3FAE6E0FA9D80826B /* libPods-RunnerTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -293,9 +291,6 @@ 334733F82668136400DCC49E /* PBXTargetDependency */, ); name = RunnerTests; - packageProductDependencies = ( - 78CF8D852BC5E7070051231B /* OCMock */, - ); productName = RunnerTests; productReference = 334733F22668136400DCC49E /* RunnerTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -347,7 +342,7 @@ isa = PBXProject; attributes = { DefaultBuildSystemTypeForWorkspace = Original; - LastUpgradeCheck = 1510; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = "The Flutter Authors"; TargetAttributes = { 334733F12668136400DCC49E = { @@ -379,9 +374,6 @@ Base, ); mainGroup = 97C146E51CF9000F007C117D; - packageReferences = ( - 78CF8D842BC5E7070051231B /* XCRemoteSwiftPackageReference "ocmock" */, - ); productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; projectRoot = ""; @@ -887,25 +879,6 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ - -/* Begin XCRemoteSwiftPackageReference section */ - 78CF8D842BC5E7070051231B /* XCRemoteSwiftPackageReference "ocmock" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/erikdoe/ocmock"; - requirement = { - kind = revision; - revision = ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a; - }; - }; -/* End XCRemoteSwiftPackageReference section */ - -/* Begin XCSwiftPackageProductDependency section */ - 78CF8D852BC5E7070051231B /* OCMock */ = { - isa = XCSwiftPackageProductDependency; - package = 78CF8D842BC5E7070051231B /* XCRemoteSwiftPackageReference "ocmock" */; - productName = OCMock; - }; -/* End XCSwiftPackageProductDependency section */ }; rootObject = 97C146E61CF9000F007C117D /* Project object */; } diff --git a/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 69f8d7acc40b..000000000000 --- a/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,13 +0,0 @@ -{ - "pins" : [ - { - "identity" : "ocmock", - "kind" : "remoteSourceControl", - "location" : "https://github.com/erikdoe/ocmock", - "state" : { - "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" - } - } - ], - "version" : 2 -} diff --git a/packages/image_picker/image_picker_ios/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/image_picker/image_picker_ios/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 69f8d7acc40b..000000000000 --- a/packages/image_picker/image_picker_ios/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,13 +0,0 @@ -{ - "pins" : [ - { - "identity" : "ocmock", - "kind" : "remoteSourceControl", - "location" : "https://github.com/erikdoe/ocmock", - "state" : { - "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" - } - } - ], - "version" : 2 -} diff --git a/packages/image_picker/image_picker_ios/ios/Assets/.gitkeep b/packages/image_picker/image_picker_ios/ios/Assets/.gitkeep new file mode 100755 index 000000000000..e69de29bb2d1 diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerImageUtil.h b/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerImageUtil.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerImageUtil.h rename to packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerImageUtil.h diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerImageUtil.m b/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerImageUtil.m similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerImageUtil.m rename to packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerImageUtil.m diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerMetaDataUtil.h b/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerMetaDataUtil.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerMetaDataUtil.h rename to packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerMetaDataUtil.h diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerMetaDataUtil.m b/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerMetaDataUtil.m similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerMetaDataUtil.m rename to packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerMetaDataUtil.m diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPhotoAssetUtil.h b/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPhotoAssetUtil.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPhotoAssetUtil.h rename to packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPhotoAssetUtil.h diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPhotoAssetUtil.m b/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPhotoAssetUtil.m similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPhotoAssetUtil.m rename to packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPhotoAssetUtil.m diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerPlugin.h b/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPlugin.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerPlugin.h rename to packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPlugin.h diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPlugin.m b/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPlugin.m similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPlugin.m rename to packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPlugin.m diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPlugin_Test.h b/packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPlugin_Test.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPlugin_Test.h rename to packages/image_picker/image_picker_ios/ios/Classes/FLTImagePickerPlugin_Test.h diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTPHPickerSaveImageToPathOperation.h b/packages/image_picker/image_picker_ios/ios/Classes/FLTPHPickerSaveImageToPathOperation.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTPHPickerSaveImageToPathOperation.h rename to packages/image_picker/image_picker_ios/ios/Classes/FLTPHPickerSaveImageToPathOperation.h diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTPHPickerSaveImageToPathOperation.m b/packages/image_picker/image_picker_ios/ios/Classes/FLTPHPickerSaveImageToPathOperation.m similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/FLTPHPickerSaveImageToPathOperation.m rename to packages/image_picker/image_picker_ios/ios/Classes/FLTPHPickerSaveImageToPathOperation.m diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/ImagePickerPlugin.modulemap b/packages/image_picker/image_picker_ios/ios/Classes/ImagePickerPlugin.modulemap similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/ImagePickerPlugin.modulemap rename to packages/image_picker/image_picker_ios/ios/Classes/ImagePickerPlugin.modulemap diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios-umbrella.h b/packages/image_picker/image_picker_ios/ios/Classes/image_picker_ios-umbrella.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios-umbrella.h rename to packages/image_picker/image_picker_ios/ios/Classes/image_picker_ios-umbrella.h diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/messages.g.h b/packages/image_picker/image_picker_ios/ios/Classes/messages.g.h similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/messages.g.h rename to packages/image_picker/image_picker_ios/ios/Classes/messages.g.h diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/messages.g.m b/packages/image_picker/image_picker_ios/ios/Classes/messages.g.m similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/messages.g.m rename to packages/image_picker/image_picker_ios/ios/Classes/messages.g.m diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/Resources/PrivacyInfo.xcprivacy b/packages/image_picker/image_picker_ios/ios/Resources/PrivacyInfo.xcprivacy similarity index 100% rename from packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/Resources/PrivacyInfo.xcprivacy rename to packages/image_picker/image_picker_ios/ios/Resources/PrivacyInfo.xcprivacy diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios.podspec b/packages/image_picker/image_picker_ios/ios/image_picker_ios.podspec index 17ef1b968264..4e4753835202 100644 --- a/packages/image_picker/image_picker_ios/ios/image_picker_ios.podspec +++ b/packages/image_picker/image_picker_ios/ios/image_picker_ios.podspec @@ -14,11 +14,11 @@ Downloaded by pub (not CocoaPods). s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/image_picker_ios' } s.documentation_url = 'https://pub.dev/packages/image_picker_ios' - s.source_files = 'image_picker_ios/Sources/image_picker_ios/**/*.{h,m}' - s.public_header_files = 'image_picker_ios/Sources/image_picker_ios/**/*.h' - s.module_map = 'image_picker_ios/Sources/image_picker_ios/include/ImagePickerPlugin.modulemap' + s.source_files = 'Classes/**/*.{h,m}' + s.public_header_files = 'Classes/**/*.h' + s.module_map = 'Classes/ImagePickerPlugin.modulemap' s.dependency 'Flutter' s.platform = :ios, '12.0' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } - s.resource_bundles = {'image_picker_ios_privacy' => ['image_picker_ios/Sources/image_picker_ios/Resources/PrivacyInfo.xcprivacy']} + s.resource_bundles = {'image_picker_ios_privacy' => ['Resources/PrivacyInfo.xcprivacy']} end diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Package.swift b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Package.swift deleted file mode 100644 index 411869087159..000000000000 --- a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Package.swift +++ /dev/null @@ -1,31 +0,0 @@ -// swift-tools-version: 5.9 - -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import PackageDescription - -let package = Package( - name: "image_picker_ios", - platforms: [ - .iOS("12.0") - ], - products: [ - .library(name: "image-picker-ios", targets: ["image_picker_ios"]) - ], - dependencies: [], - targets: [ - .target( - name: "image_picker_ios", - dependencies: [], - exclude: ["include/ImagePickerPlugin.modulemap"], - resources: [ - .process("Resources") - ], - cSettings: [ - .headerSearchPath("include/image_picker_ios") - ] - ) - ] -) diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/module.modulemap b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/module.modulemap deleted file mode 100644 index ca9c1c4d0322..000000000000 --- a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/module.modulemap +++ /dev/null @@ -1,14 +0,0 @@ -module image_picker_ios { - umbrella header "image_picker_ios-umbrella.h" - - export * - module * { export * } - - explicit module Test { - header "../FLTImagePickerPlugin_Test.h" - header "../FLTImagePickerImageUtil.h" - header "../FLTImagePickerMetaDataUtil.h" - header "../FLTImagePickerPhotoAssetUtil.h" - header "../FLTPHPickerSaveImageToPathOperation.h" - } -} diff --git a/packages/image_picker/image_picker_ios/pigeons/messages.dart b/packages/image_picker/image_picker_ios/pigeons/messages.dart index 652389dc66fc..d8ae8954e984 100644 --- a/packages/image_picker/image_picker_ios/pigeons/messages.dart +++ b/packages/image_picker/image_picker_ios/pigeons/messages.dart @@ -7,8 +7,8 @@ import 'package:pigeon/pigeon.dart'; @ConfigurePigeon(PigeonOptions( dartOut: 'lib/src/messages.g.dart', dartTestOut: 'test/test_api.g.dart', - objcHeaderOut: 'ios/image_picker_ios/Sources/image_picker_ios/messages.g.h', - objcSourceOut: 'ios/image_picker_ios/Sources/image_picker_ios/messages.g.m', + objcHeaderOut: 'ios/Classes/messages.g.h', + objcSourceOut: 'ios/Classes/messages.g.m', objcOptions: ObjcOptions( prefix: 'FLT', ), diff --git a/packages/image_picker/image_picker_ios/pubspec.yaml b/packages/image_picker/image_picker_ios/pubspec.yaml index 00c33496cefd..d57e2b6ee7b8 100755 --- a/packages/image_picker/image_picker_ios/pubspec.yaml +++ b/packages/image_picker/image_picker_ios/pubspec.yaml @@ -2,7 +2,7 @@ name: image_picker_ios description: iOS implementation of the image_picker plugin. repository: https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker_ios issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22 -version: 0.8.11 +version: 0.8.10+1 environment: sdk: ^3.3.0 From d670b2c38c8db0a773aa703e7d3f15682e05ad7f Mon Sep 17 00:00:00 2001 From: Victoria Ashworth <15619084+vashworth@users.noreply.github.com> Date: Wed, 8 May 2024 15:30:07 -0500 Subject: [PATCH 5/5] Temporarily add empty header files to video_player_avfoundation so include directory is downloaded (#6694) Fixes https://github.com/flutter/flutter/issues/148003. Temporary solution to make tree green. --- .../video_player/video_player_avfoundation/CHANGELOG.md | 4 ++++ .../video_player_avfoundation_ios/include/FVPEmpty.h | 6 ++++++ .../video_player_avfoundation_macos/include/FVPEmpty.h | 6 ++++++ .../video_player/video_player_avfoundation/pubspec.yaml | 2 +- 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_ios/include/FVPEmpty.h create mode 100644 packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/include/FVPEmpty.h diff --git a/packages/video_player/video_player_avfoundation/CHANGELOG.md b/packages/video_player/video_player_avfoundation/CHANGELOG.md index b9b80aa49dbf..4ea05f7f1a9e 100644 --- a/packages/video_player/video_player_avfoundation/CHANGELOG.md +++ b/packages/video_player/video_player_avfoundation/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.6.1 + +* Adds files to make include directory permanent. + ## 2.6.0 * Adds Swift Package Manager compatibility. diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_ios/include/FVPEmpty.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_ios/include/FVPEmpty.h new file mode 100644 index 000000000000..c7b344f7299d --- /dev/null +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_ios/include/FVPEmpty.h @@ -0,0 +1,6 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Empty file to perserve include directory in pub-cache. See +// https://github.com/flutter/flutter/issues/148002 for more information. diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/include/FVPEmpty.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/include/FVPEmpty.h new file mode 100644 index 000000000000..c7b344f7299d --- /dev/null +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/include/FVPEmpty.h @@ -0,0 +1,6 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Empty file to perserve include directory in pub-cache. See +// https://github.com/flutter/flutter/issues/148002 for more information. diff --git a/packages/video_player/video_player_avfoundation/pubspec.yaml b/packages/video_player/video_player_avfoundation/pubspec.yaml index f3f97767216f..674684ee789d 100644 --- a/packages/video_player/video_player_avfoundation/pubspec.yaml +++ b/packages/video_player/video_player_avfoundation/pubspec.yaml @@ -2,7 +2,7 @@ name: video_player_avfoundation description: iOS and macOS implementation of the video_player plugin. repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_avfoundation issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 -version: 2.6.0 +version: 2.6.1 environment: sdk: ^3.2.3