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