From 198fcd610b1a5fe069ea589108cb0761272a7357 Mon Sep 17 00:00:00 2001 From: Victoria Ashworth Date: Fri, 26 Apr 2024 10:47:45 -0500 Subject: [PATCH 1/8] Convert image_picker_ios into a Swift Package --- .../image_picker_ios/example/ios/Podfile | 2 - .../ios/Runner.xcodeproj/project.pbxproj | 48 +++++++++++++++++-- .../xcshareddata/swiftpm/Package.resolved | 13 +++++ .../xcshareddata/xcschemes/Runner.xcscheme | 20 +++++++- .../xcshareddata/swiftpm/Package.resolved | 13 +++++ .../image_picker_ios/ios/Assets/.gitkeep | 0 .../ios/image_picker_ios.podspec | 8 ++-- .../ios/image_picker_ios/Package.swift | 28 +++++++++++ .../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 +- 26 files changed, 138 insertions(+), 12 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/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..ee78e205214d 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,8 @@ 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 */; }; + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; + 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 +131,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 78CF8D862BC5E7070051231B /* OCMock in Frameworks */, 3A72BAD3FAE6E0FA9D80826B /* libPods-RunnerTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -144,6 +147,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, F4F7A436CCA4BF276270A3AE /* libPods-Runner.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -291,6 +295,9 @@ 334733F82668136400DCC49E /* PBXTargetDependency */, ); name = RunnerTests; + packageProductDependencies = ( + 78CF8D852BC5E7070051231B /* OCMock */, + ); productName = RunnerTests; productReference = 334733F22668136400DCC49E /* RunnerTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -331,6 +338,9 @@ dependencies = ( ); name = Runner; + packageProductDependencies = ( + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, + ); productName = Runner; productReference = 97C146EE1CF9000F007C117D /* Runner.app */; productType = "com.apple.product-type.application"; @@ -342,7 +352,7 @@ isa = PBXProject; attributes = { DefaultBuildSystemTypeForWorkspace = Original; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = "The Flutter Authors"; TargetAttributes = { 334733F12668136400DCC49E = { @@ -374,6 +384,10 @@ Base, ); mainGroup = 97C146E51CF9000F007C117D; + packageReferences = ( + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, + 78CF8D842BC5E7070051231B /* XCRemoteSwiftPackageReference "ocmock" */, + ); productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; projectRoot = ""; @@ -458,12 +472,10 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/image_picker_ios/image_picker_ios_privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/video_player_avfoundation/video_player_avfoundation_privacy.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/image_picker_ios_privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/video_player_avfoundation_privacy.bundle", ); runOnlyForDeploymentPostprocessing = 0; @@ -879,6 +891,36 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; + }; +/* End XCLocalSwiftPackageReference 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 */ + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { + isa = XCSwiftPackageProductDependency; + productName = FlutterGeneratedPluginSwiftPackage; + }; + 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.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index bca5e89903bb..911d6a9794c0 100755 --- a/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,10 +1,28 @@ + + + + + + + + + + '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/include/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..ecaa33249a24 --- /dev/null +++ b/packages/image_picker/image_picker_ios/ios/image_picker_ios/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. + +import PackageDescription + +let package = Package( + name: "image_picker_ios", + platforms: [ + .iOS("12.0"), + .macOS("10.14") + ], + products: [ + .library(name: "image-picker-ios", targets: ["image_picker_ios"]) + ], + dependencies: [], + targets: [ + .target( + name: "image_picker_ios", + dependencies: [], + 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', ), From 543e47076b11f7331e28490ef748f56974f8d38b Mon Sep 17 00:00:00 2001 From: Victoria Ashworth Date: Fri, 26 Apr 2024 10:50:36 -0500 Subject: [PATCH 2/8] Update changelog and pubspec version --- packages/image_picker/image_picker_ios/CHANGELOG.md | 4 ++++ packages/image_picker/image_picker_ios/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/image_picker/image_picker_ios/CHANGELOG.md b/packages/image_picker/image_picker_ios/CHANGELOG.md index daff28555b81..f44c2a7e7ec2 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.10+2 + +* 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/pubspec.yaml b/packages/image_picker/image_picker_ios/pubspec.yaml index d57e2b6ee7b8..ce6fc0fe497c 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.10+2 environment: sdk: ^3.3.0 From 32d94dfb35caaf71aa23088641f3d61c1775e025 Mon Sep 17 00:00:00 2001 From: Victoria Ashworth Date: Fri, 26 Apr 2024 13:40:45 -0500 Subject: [PATCH 3/8] fix tests --- .../ios/Runner.xcodeproj/project.pbxproj | 19 ++----------------- .../ios/image_picker_ios.podspec | 1 + .../FLTImagePickerImageUtil.h | 0 .../FLTImagePickerMetaDataUtil.h | 0 .../FLTImagePickerPhotoAssetUtil.h | 0 .../FLTImagePickerPlugin_Test.h | 0 .../FLTPHPickerSaveImageToPathOperation.h | 0 .../image_picker_ios-umbrella.h | 0 .../image_picker_ios}/messages.g.h | 0 .../tool/lib/src/license_check_command.dart | 1 + 10 files changed, 4 insertions(+), 17 deletions(-) rename packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/{ => include/image_picker_ios}/FLTImagePickerImageUtil.h (100%) rename packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/{ => include/image_picker_ios}/FLTImagePickerMetaDataUtil.h (100%) rename packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/{ => include/image_picker_ios}/FLTImagePickerPhotoAssetUtil.h (100%) rename packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/{ => include/image_picker_ios}/FLTImagePickerPlugin_Test.h (100%) rename packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/{ => include/image_picker_ios}/FLTPHPickerSaveImageToPathOperation.h (100%) rename packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/{ => image_picker_ios}/image_picker_ios-umbrella.h (100%) rename packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/{ => include/image_picker_ios}/messages.g.h (100%) 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 ee78e205214d..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,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 */; }; - 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; 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 */; }; @@ -147,7 +146,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, F4F7A436CCA4BF276270A3AE /* libPods-Runner.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -338,9 +336,6 @@ dependencies = ( ); name = Runner; - packageProductDependencies = ( - 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, - ); productName = Runner; productReference = 97C146EE1CF9000F007C117D /* Runner.app */; productType = "com.apple.product-type.application"; @@ -385,7 +380,6 @@ ); mainGroup = 97C146E51CF9000F007C117D; packageReferences = ( - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, 78CF8D842BC5E7070051231B /* XCRemoteSwiftPackageReference "ocmock" */, ); productRefGroup = 97C146EF1CF9000F007C117D /* Products */; @@ -472,10 +466,12 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/image_picker_ios/image_picker_ios_privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/video_player_avfoundation/video_player_avfoundation_privacy.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/image_picker_ios_privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/video_player_avfoundation_privacy.bundle", ); runOnlyForDeploymentPostprocessing = 0; @@ -892,13 +888,6 @@ }; /* End XCConfigurationList section */ -/* Begin XCLocalSwiftPackageReference section */ - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { - isa = XCLocalSwiftPackageReference; - relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; - }; -/* End XCLocalSwiftPackageReference section */ - /* Begin XCRemoteSwiftPackageReference section */ 78CF8D842BC5E7070051231B /* XCRemoteSwiftPackageReference "ocmock" */ = { isa = XCRemoteSwiftPackageReference; @@ -911,10 +900,6 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { - isa = XCSwiftPackageProductDependency; - productName = FlutterGeneratedPluginSwiftPackage; - }; 78CF8D852BC5E7070051231B /* OCMock */ = { isa = XCSwiftPackageProductDependency; package = 78CF8D842BC5E7070051231B /* XCRemoteSwiftPackageReference "ocmock" */; 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 b22f41e2130d..f09bb434177e 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 @@ -21,4 +21,5 @@ Downloaded by pub (not CocoaPods). 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.exclude_files = ['image_picker_ios/Package.swift', 'image_picker_ios/Sources/image_picker_ios/include/module.modulemap'] end 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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerImageUtil.h 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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerMetaDataUtil.h 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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerPhotoAssetUtil.h 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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTPHPickerSaveImageToPathOperation.h 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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/messages.g.h diff --git a/script/tool/lib/src/license_check_command.dart b/script/tool/lib/src/license_check_command.dart index 5f01cca7b967..e98c06d81428 100644 --- a/script/tool/lib/src/license_check_command.dart +++ b/script/tool/lib/src/license_check_command.dart @@ -40,6 +40,7 @@ const Set _ignoreSuffixList = { // Full basenames of files to ignore. const Set _ignoredFullBasenameList = { 'resource.h', // Generated by VS. + 'Package.swift', // Swift Package Manifest file. }; // Copyright and license regexes for third-party code. From 3d79914d87b3c704ac88ab5b95eb19b11d5b54d9 Mon Sep 17 00:00:00 2001 From: Victoria Ashworth Date: Fri, 26 Apr 2024 13:51:11 -0500 Subject: [PATCH 4/8] fix SwiftPM modulemap --- .../image_picker_ios/include/module.modulemap | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 index ca9c1c4d0322..aafc44d5b191 100644 --- 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 @@ -1,14 +1,14 @@ module image_picker_ios { - umbrella header "image_picker_ios-umbrella.h" + umbrella header "image_picker_ios/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" + header "image_picker_ios/FLTImagePickerPlugin_Test.h" + header "image_picker_ios/FLTImagePickerImageUtil.h" + header "image_picker_ios/FLTImagePickerMetaDataUtil.h" + header "image_picker_ios/FLTImagePickerPhotoAssetUtil.h" + header "image_picker_ios/FLTPHPickerSaveImageToPathOperation.h" } } From ecc78e4ce09017b3afc6d5749d4097fe3932cefc Mon Sep 17 00:00:00 2001 From: Victoria Ashworth Date: Mon, 29 Apr 2024 16:38:55 -0500 Subject: [PATCH 5/8] fix formatting and header file locations --- .../ios/image_picker_ios.podspec | 3 +- .../ios/image_picker_ios/Package.swift | 43 ++++++++++--------- .../FLTImagePickerImageUtil.h | 0 .../FLTImagePickerMetaDataUtil.h | 0 .../FLTImagePickerPhotoAssetUtil.h | 0 .../FLTImagePickerPlugin_Test.h | 0 .../FLTPHPickerSaveImageToPathOperation.h | 0 .../image_picker_ios-umbrella.h | 0 .../image_picker_ios/include/module.modulemap | 12 +++--- .../image_picker_ios => }/messages.g.h | 0 10 files changed, 29 insertions(+), 29 deletions(-) rename packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/{include/image_picker_ios => }/FLTImagePickerImageUtil.h (100%) rename packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/{include/image_picker_ios => }/FLTImagePickerMetaDataUtil.h (100%) rename packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/{include/image_picker_ios => }/FLTImagePickerPhotoAssetUtil.h (100%) rename packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/{include/image_picker_ios => }/FLTImagePickerPlugin_Test.h (100%) rename packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/{include/image_picker_ios => }/FLTPHPickerSaveImageToPathOperation.h (100%) rename packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/{image_picker_ios => }/image_picker_ios-umbrella.h (100%) rename packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/{include/image_picker_ios => }/messages.g.h (100%) 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 f09bb434177e..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 @@ -15,11 +15,10 @@ Downloaded by pub (not CocoaPods). 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/include/image_picker_ios/**/*.h' + 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' => ['image_picker_ios/Sources/image_picker_ios/Resources/PrivacyInfo.xcprivacy']} - s.exclude_files = ['image_picker_ios/Package.swift', 'image_picker_ios/Sources/image_picker_ios/include/module.modulemap'] 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 index ecaa33249a24..58e1efccd449 100644 --- 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 @@ -4,25 +4,26 @@ import PackageDescription let package = Package( - name: "image_picker_ios", - platforms: [ - .iOS("12.0"), - .macOS("10.14") - ], - products: [ - .library(name: "image-picker-ios", targets: ["image_picker_ios"]) - ], - dependencies: [], - targets: [ - .target( - name: "image_picker_ios", - dependencies: [], - resources: [ - .process("Resources") - ], - cSettings: [ - .headerSearchPath("include/image_picker_ios") - ] - ) - ] + name: "image_picker_ios", + platforms: [ + .iOS("12.0"), + .macOS("10.14"), + ], + 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/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/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 index aafc44d5b191..ca9c1c4d0322 100644 --- 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 @@ -1,14 +1,14 @@ module image_picker_ios { - umbrella header "image_picker_ios/image_picker_ios-umbrella.h" + umbrella header "image_picker_ios-umbrella.h" export * module * { export * } explicit module Test { - header "image_picker_ios/FLTImagePickerPlugin_Test.h" - header "image_picker_ios/FLTImagePickerImageUtil.h" - header "image_picker_ios/FLTImagePickerMetaDataUtil.h" - header "image_picker_ios/FLTImagePickerPhotoAssetUtil.h" - header "image_picker_ios/FLTPHPickerSaveImageToPathOperation.h" + 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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/messages.g.h rename to packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/messages.g.h From 45f27af4c090b7c452ca1157e674900fa8e2562a Mon Sep 17 00:00:00 2001 From: Victoria Ashworth Date: Wed, 1 May 2024 13:36:03 -0500 Subject: [PATCH 6/8] Add license, remove migration change --- .../xcshareddata/xcschemes/Runner.xcscheme | 20 +------------------ .../ios/image_picker_ios/Package.swift | 5 ++++- .../tool/lib/src/license_check_command.dart | 1 - 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 911d6a9794c0..bca5e89903bb 100755 --- a/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/image_picker/image_picker_ios/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,28 +1,10 @@ - - - - - - - - - - _ignoreSuffixList = { // Full basenames of files to ignore. const Set _ignoredFullBasenameList = { 'resource.h', // Generated by VS. - 'Package.swift', // Swift Package Manifest file. }; // Copyright and license regexes for third-party code. From 8063bece5ea81f830e4c73edb62d4ce7d10bfff1 Mon Sep 17 00:00:00 2001 From: Victoria Ashworth Date: Mon, 6 May 2024 11:24:34 -0500 Subject: [PATCH 7/8] Change version to minor upgrade --- packages/image_picker/image_picker_ios/CHANGELOG.md | 2 +- packages/image_picker/image_picker_ios/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/image_picker/image_picker_ios/CHANGELOG.md b/packages/image_picker/image_picker_ios/CHANGELOG.md index f44c2a7e7ec2..259cc601dd22 100644 --- a/packages/image_picker/image_picker_ios/CHANGELOG.md +++ b/packages/image_picker/image_picker_ios/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.8.10+2 +## 0.8.11 * Adds Swift Package Manager compatibility. diff --git a/packages/image_picker/image_picker_ios/pubspec.yaml b/packages/image_picker/image_picker_ios/pubspec.yaml index ce6fc0fe497c..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+2 +version: 0.8.11 environment: sdk: ^3.3.0 From ad4347adb99c99e660a7b1a83bdd2133f9ecadb7 Mon Sep 17 00:00:00 2001 From: Victoria Ashworth Date: Wed, 8 May 2024 13:39:37 -0500 Subject: [PATCH 8/8] remove macOS supported platform version --- .../image_picker_ios/ios/image_picker_ios/Package.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 index 1cd1efa7e202..411869087159 100644 --- 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 @@ -9,8 +9,7 @@ import PackageDescription let package = Package( name: "image_picker_ios", platforms: [ - .iOS("12.0"), - .macOS("10.14"), + .iOS("12.0") ], products: [ .library(name: "image-picker-ios", targets: ["image_picker_ios"])