diff --git a/.gitignore b/.gitignore
index 1354c8e4..e689869b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,6 +17,9 @@ Pods/
**/Flutter/flutter_assets/
ServiceDefinitions.json
xcuserdata/
+**/.swiftpm/
+**/swiftpm/
+**/.build/
local.properties
.gradle/
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 57fe3aa4..c5368585 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 8.3.0
+### Desktop (macOS) && iOS
+- Adds support for Swift Package Manager for compatibility with new projects [#1582](https://github.com/miguelpruivo/flutter_file_picker/issues/1582)
+
## 8.2.0
### Desktop (macOS)
- Reimplement macOS file picker using method channels (fixes [#1492](https://github.com/miguelpruivo/flutter_file_picker/issues/1492), [#1445](https://github.com/miguelpruivo/flutter_file_picker/issues/1445), [#1674](https://github.com/miguelpruivo/flutter_file_picker/issues/1674), [#1685](https://github.com/miguelpruivo/flutter_file_picker/issues/1685))
diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist
index 9625e105..7c569640 100644
--- a/example/ios/Flutter/AppFrameworkInfo.plist
+++ b/example/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 11.0
+ 12.0
diff --git a/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig
index e8efba11..592ceee8 100644
--- a/example/ios/Flutter/Debug.xcconfig
+++ b/example/ios/Flutter/Debug.xcconfig
@@ -1,2 +1 @@
-#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig
index 399e9340..592ceee8 100644
--- a/example/ios/Flutter/Release.xcconfig
+++ b/example/ios/Flutter/Release.xcconfig
@@ -1,2 +1 @@
-#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
diff --git a/example/ios/Podfile b/example/ios/Podfile
deleted file mode 100644
index 11cfce66..00000000
--- a/example/ios/Podfile
+++ /dev/null
@@ -1,38 +0,0 @@
-# Uncomment this line to define a global platform for your project
-# platform :ios, '11.0'
-
-# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
-ENV['COCOAPODS_DISABLE_STATS'] = 'true'
-
-project 'Runner', {
- 'Debug' => :debug,
- 'Profile' => :release,
- 'Release' => :release,
-}
-
-def flutter_root
- generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
- unless File.exist?(generated_xcode_build_settings_path)
- raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
- end
-
- File.foreach(generated_xcode_build_settings_path) do |line|
- matches = line.match(/FLUTTER_ROOT\=(.*)/)
- return matches[1].strip if matches
- end
- raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
-end
-
-require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
-
-flutter_ios_podfile_setup
-
-target 'Runner' do
- use_modular_headers!
- flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
-end
-post_install do |installer|
- installer.pods_project.targets.each do |target|
- flutter_additional_ios_build_settings(target)
- end
-end
diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj
index 74d1f1df..2c84137d 100644
--- a/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/example/ios/Runner.xcodeproj/project.pbxproj
@@ -10,7 +10,7 @@
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3FE946DC26F9441F00BAC82E /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FE946DB26F9441F00BAC82E /* File.swift */; };
- 8D316995225B034B08E9EF9B /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 50E1B6F216BA0C0D74ADE2D3 /* libPods-Runner.a */; };
+ 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
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 */; };
@@ -32,14 +32,11 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
- 12526927AA724E8A8C5BA965 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
3FE946DA26F9441E00BAC82E /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
3FE946DB26F9441F00BAC82E /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; };
- 50E1B6F216BA0C0D74ADE2D3 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
- 620D3249E16C66CF31F39A1D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
@@ -58,7 +55,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 8D316995225B034B08E9EF9B /* libPods-Runner.a in Frameworks */,
+ 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -82,8 +79,6 @@
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
- E62393F6B8A7F2BF56A0B62D /* Pods */,
- D2A1DF9F69FF1E54F4223294 /* Frameworks */,
);
sourceTree = "";
};
@@ -121,23 +116,6 @@
name = "Supporting Files";
sourceTree = "";
};
- D2A1DF9F69FF1E54F4223294 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 50E1B6F216BA0C0D74ADE2D3 /* libPods-Runner.a */,
- );
- name = Frameworks;
- sourceTree = "";
- };
- E62393F6B8A7F2BF56A0B62D /* Pods */ = {
- isa = PBXGroup;
- children = (
- 620D3249E16C66CF31F39A1D /* Pods-Runner.debug.xcconfig */,
- 12526927AA724E8A8C5BA965 /* Pods-Runner.release.xcconfig */,
- );
- path = Pods;
- sourceTree = "";
- };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -145,20 +123,21 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
- FC67C2E2F2E4233AAAFA3380 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- FC59F4D74A4E2F538FF726C2 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
+ packageProductDependencies = (
+ 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
+ );
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
@@ -169,7 +148,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1430;
+ LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -189,6 +168,9 @@
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
+ packageReferences = (
+ 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
+ );
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
@@ -244,48 +226,6 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
- FC59F4D74A4E2F538FF726C2 /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh",
- "${PODS_CONFIGURATION_BUILD_DIR}/DKImagePickerController/DKImagePickerController.bundle",
- "${PODS_CONFIGURATION_BUILD_DIR}/DKPhotoGallery/DKPhotoGallery.bundle",
- );
- name = "[CP] Copy Pods Resources";
- outputPaths = (
- "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DKImagePickerController.bundle",
- "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DKPhotoGallery.bundle",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
- FC67C2E2F2E4233AAAFA3380 /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
- showEnvVarsInLog = 0;
- };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -369,7 +309,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -418,7 +358,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -443,7 +383,11 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
@@ -475,7 +419,11 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
@@ -511,6 +459,20 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
+
+/* Begin XCLocalSwiftPackageReference section */
+ 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
+ isa = XCLocalSwiftPackageReference;
+ relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
+ };
+/* End XCLocalSwiftPackageReference section */
+
+/* Begin XCSwiftPackageProductDependency section */
+ 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
+ isa = XCSwiftPackageProductDependency;
+ productName = FlutterGeneratedPluginSwiftPackage;
+ };
+/* End XCSwiftPackageProductDependency section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
new file mode 100644
index 00000000..6e2f03b1
--- /dev/null
+++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -0,0 +1,60 @@
+{
+ "originHash" : "6c38515dcb7706ad3b5b98f1e04702f9a93dc8d3578996c9f07b67f60c5fc12b",
+ "pins" : [
+ {
+ "identity" : "dkcamera",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/zhangao0086/DKCamera",
+ "state" : {
+ "branch" : "master",
+ "revision" : "5c691d11014b910aff69f960475d70e65d9dcc96"
+ }
+ },
+ {
+ "identity" : "dkimagepickercontroller",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/zhangao0086/DKImagePickerController",
+ "state" : {
+ "branch" : "4.3.9",
+ "revision" : "0bdfeacefa308545adde07bef86e349186335915"
+ }
+ },
+ {
+ "identity" : "dkphotogallery",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/zhangao0086/DKPhotoGallery",
+ "state" : {
+ "branch" : "master",
+ "revision" : "311c1bc7a94f1538f82773a79c84374b12a2ef3d"
+ }
+ },
+ {
+ "identity" : "sdwebimage",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/SDWebImage/SDWebImage",
+ "state" : {
+ "revision" : "10d06f6a33bafae8c164fbfd1f03391f6d4692b3",
+ "version" : "5.20.0"
+ }
+ },
+ {
+ "identity" : "swiftygif",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/kirualex/SwiftyGif.git",
+ "state" : {
+ "revision" : "4430cbc148baa3907651d40562d96325426f409a",
+ "version" : "5.4.5"
+ }
+ },
+ {
+ "identity" : "tocropviewcontroller",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/TimOliver/TOCropViewController",
+ "state" : {
+ "revision" : "a634cb7cdfd580006e79a6e74e64417fe9e9783b",
+ "version" : "2.7.4"
+ }
+ }
+ ],
+ "version" : 3
+}
diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index 9c585c83..f66dfbe5 100644
--- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,10 +1,28 @@
+
+
+
+
+
+
+
+
+
+
-
-
diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift
index 70693e4a..b6363034 100644
--- a/example/ios/Runner/AppDelegate.swift
+++ b/example/ios/Runner/AppDelegate.swift
@@ -1,7 +1,7 @@
import UIKit
import Flutter
-@UIApplicationMain
+@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
diff --git a/example/macos/Flutter/Flutter-Debug.xcconfig b/example/macos/Flutter/Flutter-Debug.xcconfig
index 4b81f9b2..c2efd0b6 100644
--- a/example/macos/Flutter/Flutter-Debug.xcconfig
+++ b/example/macos/Flutter/Flutter-Debug.xcconfig
@@ -1,2 +1 @@
-#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
diff --git a/example/macos/Flutter/Flutter-Release.xcconfig b/example/macos/Flutter/Flutter-Release.xcconfig
index 5caa9d15..c2efd0b6 100644
--- a/example/macos/Flutter/Flutter-Release.xcconfig
+++ b/example/macos/Flutter/Flutter-Release.xcconfig
@@ -1,2 +1 @@
-#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
diff --git a/example/macos/Podfile b/example/macos/Podfile
deleted file mode 100644
index c795730d..00000000
--- a/example/macos/Podfile
+++ /dev/null
@@ -1,43 +0,0 @@
-platform :osx, '10.14'
-
-# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
-ENV['COCOAPODS_DISABLE_STATS'] = 'true'
-
-project 'Runner', {
- 'Debug' => :debug,
- 'Profile' => :release,
- 'Release' => :release,
-}
-
-def flutter_root
- generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
- unless File.exist?(generated_xcode_build_settings_path)
- raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
- end
-
- File.foreach(generated_xcode_build_settings_path) do |line|
- matches = line.match(/FLUTTER_ROOT\=(.*)/)
- return matches[1].strip if matches
- end
- raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
-end
-
-require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
-
-flutter_macos_podfile_setup
-
-target 'Runner' do
- use_frameworks!
- use_modular_headers!
-
- flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
- target 'RunnerTests' do
- inherit! :search_paths
- end
-end
-
-post_install do |installer|
- installer.pods_project.targets.each do |target|
- flutter_additional_macos_build_settings(target)
- end
-end
diff --git a/example/macos/Runner.xcodeproj/project.pbxproj b/example/macos/Runner.xcodeproj/project.pbxproj
index 66dade26..09380ebe 100644
--- a/example/macos/Runner.xcodeproj/project.pbxproj
+++ b/example/macos/Runner.xcodeproj/project.pbxproj
@@ -27,8 +27,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 */; };
- A22ABF1545C676F16995EC7E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 411DF655999EC8932DA963E8 /* Pods_Runner.framework */; };
- C51B5854AE141E70802B0281 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 932EC8AB5D293E73C56B1959 /* Pods_RunnerTests.framework */; };
+ 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -62,8 +61,6 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
- 04B03B77F4E2F15928C67E43 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
- 16D629275E6BBB16BDEB3BA6 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; };
331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; };
@@ -80,14 +77,8 @@
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; };
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; };
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; };
- 411DF655999EC8932DA963E8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- 6ABF3BC6E2FB0435839D28B3 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; };
- 932EC8AB5D293E73C56B1959 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; };
- A54E29CEDF0D070022BD651D /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; };
- AAD8B1FF325ECF68FAA1DC89 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
- B56D2E20021F050A3964B9C5 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -95,7 +86,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- C51B5854AE141E70802B0281 /* Pods_RunnerTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -103,7 +93,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- A22ABF1545C676F16995EC7E /* Pods_Runner.framework in Frameworks */,
+ 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -136,8 +126,6 @@
33CEB47122A05771004F2AC0 /* Flutter */,
331C80D6294CF71000263BE5 /* RunnerTests */,
33CC10EE2044A3C60003C045 /* Products */,
- D73912EC22F37F3D000D13A0 /* Frameworks */,
- 802D160251B7282FA0690D21 /* Pods */,
);
sourceTree = "";
};
@@ -185,28 +173,6 @@
path = Runner;
sourceTree = "";
};
- 802D160251B7282FA0690D21 /* Pods */ = {
- isa = PBXGroup;
- children = (
- B56D2E20021F050A3964B9C5 /* Pods-Runner.debug.xcconfig */,
- 04B03B77F4E2F15928C67E43 /* Pods-Runner.release.xcconfig */,
- AAD8B1FF325ECF68FAA1DC89 /* Pods-Runner.profile.xcconfig */,
- A54E29CEDF0D070022BD651D /* Pods-RunnerTests.debug.xcconfig */,
- 16D629275E6BBB16BDEB3BA6 /* Pods-RunnerTests.release.xcconfig */,
- 6ABF3BC6E2FB0435839D28B3 /* Pods-RunnerTests.profile.xcconfig */,
- );
- path = Pods;
- sourceTree = "";
- };
- D73912EC22F37F3D000D13A0 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 411DF655999EC8932DA963E8 /* Pods_Runner.framework */,
- 932EC8AB5D293E73C56B1959 /* Pods_RunnerTests.framework */,
- );
- name = Frameworks;
- sourceTree = "";
- };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -214,7 +180,6 @@
isa = PBXNativeTarget;
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
- 9F9FE7962BF6EA6A99ED4A9E /* [CP] Check Pods Manifest.lock */,
331C80D1294CF70F00263BE5 /* Sources */,
331C80D2294CF70F00263BE5 /* Frameworks */,
331C80D3294CF70F00263BE5 /* Resources */,
@@ -233,13 +198,11 @@
isa = PBXNativeTarget;
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
- 94C0333E33863CD99A2E9185 /* [CP] Check Pods Manifest.lock */,
33CC10E92044A3C60003C045 /* Sources */,
33CC10EA2044A3C60003C045 /* Frameworks */,
33CC10EB2044A3C60003C045 /* Resources */,
33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */,
- 1B9B2678FCF62B44B2FE18B6 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -247,6 +210,9 @@
33CC11202044C79F0003C045 /* PBXTargetDependency */,
);
name = Runner;
+ packageProductDependencies = (
+ 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
+ );
productName = Runner;
productReference = 33CC10ED2044A3C60003C045 /* file_picker_example.app */;
productType = "com.apple.product-type.application";
@@ -291,6 +257,9 @@
Base,
);
mainGroup = 33CC10E42044A3C60003C045;
+ packageReferences = (
+ 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
+ );
productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
projectDirPath = "";
projectRoot = "";
@@ -322,23 +291,6 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
- 1B9B2678FCF62B44B2FE18B6 /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Embed Pods Frameworks";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@@ -377,50 +329,6 @@
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
};
- 94C0333E33863CD99A2E9185 /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
- showEnvVarsInLog = 0;
- };
- 9F9FE7962BF6EA6A99ED4A9E /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
- showEnvVarsInLog = 0;
- };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -472,7 +380,6 @@
/* Begin XCBuildConfiguration section */
331C80DB294CF71000263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = A54E29CEDF0D070022BD651D /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
@@ -487,7 +394,6 @@
};
331C80DC294CF71000263BE5 /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 16D629275E6BBB16BDEB3BA6 /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
@@ -502,7 +408,6 @@
};
331C80DD294CF71000263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 6ABF3BC6E2FB0435839D28B3 /* Pods-RunnerTests.profile.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
@@ -578,7 +483,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
- MACOSX_DEPLOYMENT_TARGET = 10.13;
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
@@ -711,7 +616,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
- MACOSX_DEPLOYMENT_TARGET = 10.13;
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
@@ -732,7 +637,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
- MACOSX_DEPLOYMENT_TARGET = 10.13;
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
@@ -798,6 +703,20 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
+
+/* Begin XCLocalSwiftPackageReference section */
+ 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
+ isa = XCLocalSwiftPackageReference;
+ relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
+ };
+/* End XCLocalSwiftPackageReference section */
+
+/* Begin XCSwiftPackageProductDependency section */
+ 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
+ isa = XCSwiftPackageProductDependency;
+ productName = FlutterGeneratedPluginSwiftPackage;
+ };
+/* End XCSwiftPackageProductDependency section */
};
rootObject = 33CC10E52044A3C60003C045 /* Project object */;
}
diff --git a/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index a378a57a..c49f1a30 100644
--- a/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -5,6 +5,24 @@
+
+
+
+
+
+
+
+
+
+
-
-
diff --git a/ios/Assets/.gitkeep b/ios/Assets/.gitkeep
deleted file mode 100644
index e69de29b..00000000
diff --git a/ios/file_picker.podspec b/ios/file_picker.podspec
index 5a8501a7..3cef4a85 100644
--- a/ios/file_picker.podspec
+++ b/ios/file_picker.podspec
@@ -12,10 +12,11 @@ A flutter plugin to show native file picker dialogs.
s.license = { :file => '../LICENSE' }
s.author = 'Miguel Ruivo'
s.source = { :path => '.' }
- s.source_files = 'Classes/**/*'
- s.public_header_files = 'Classes/**/*.h'
+ s.source_files = 'file_picker/Sources/**/*.{m,h}'
+ s.public_header_files = 'file_picker/Sources/file_picker/include/**/*.h'
+ s.module_map = 'file_picker/Sources/file_picker/include/file_picker.modulemap'
- s.ios.deployment_target = '11.0'
+ s.ios.deployment_target = '12.0'
s.dependency 'Flutter'
@@ -31,7 +32,6 @@ A flutter plugin to show native file picker dialogs.
preprocess_definitions << "PICKER_DOCUMENT=1"
end
s.pod_target_xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS" => preprocess_definitions.join(' ') }
- s.resource_bundles = {'file_picker_ios_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
+ s.resource_bundles = {'file_picker_ios_privacy' => ['file_picker/Sources/file_picker/PrivacyInfo.xcprivacy']}
end
-
diff --git a/ios/file_picker/Package.resolved b/ios/file_picker/Package.resolved
new file mode 100644
index 00000000..9fda29b1
--- /dev/null
+++ b/ios/file_picker/Package.resolved
@@ -0,0 +1,59 @@
+{
+ "pins" : [
+ {
+ "identity" : "dkcamera",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/zhangao0086/DKCamera",
+ "state" : {
+ "branch" : "master",
+ "revision" : "5c691d11014b910aff69f960475d70e65d9dcc96"
+ }
+ },
+ {
+ "identity" : "dkimagepickercontroller",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/zhangao0086/DKImagePickerController",
+ "state" : {
+ "branch" : "4.3.9",
+ "revision" : "0bdfeacefa308545adde07bef86e349186335915"
+ }
+ },
+ {
+ "identity" : "dkphotogallery",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/zhangao0086/DKPhotoGallery",
+ "state" : {
+ "branch" : "master",
+ "revision" : "311c1bc7a94f1538f82773a79c84374b12a2ef3d"
+ }
+ },
+ {
+ "identity" : "sdwebimage",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/SDWebImage/SDWebImage",
+ "state" : {
+ "revision" : "10d06f6a33bafae8c164fbfd1f03391f6d4692b3",
+ "version" : "5.20.0"
+ }
+ },
+ {
+ "identity" : "swiftygif",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/kirualex/SwiftyGif.git",
+ "state" : {
+ "revision" : "4430cbc148baa3907651d40562d96325426f409a",
+ "version" : "5.4.5"
+ }
+ },
+ {
+ "identity" : "tocropviewcontroller",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/TimOliver/TOCropViewController",
+ "state" : {
+ "revision" : "a634cb7cdfd580006e79a6e74e64417fe9e9783b",
+ "version" : "2.7.4"
+ }
+ }
+ ],
+ "version" : 2
+}
diff --git a/ios/file_picker/Package.swift b/ios/file_picker/Package.swift
new file mode 100644
index 00000000..57e13d01
--- /dev/null
+++ b/ios/file_picker/Package.swift
@@ -0,0 +1,34 @@
+// 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: "file_picker",
+ platforms: [
+ .iOS("12.0")
+ ],
+ products: [
+ .library(name: "file-picker", targets: ["file_picker"])
+ ],
+ dependencies: [
+ .package(url: "https://github.com/zhangao0086/DKImagePickerController", branch: "4.3.9")
+ ],
+ targets: [
+ .target(
+ name: "file_picker",
+ dependencies: [
+ .product(name: "DKImagePickerController", package: "DKImagePickerController")
+ ],
+ resources: [
+ .process("PrivacyInfo.xcprivacy")
+ ],
+ cSettings: [
+ .headerSearchPath("include/file_picker"),
+ .define("PICKER_MEDIA"),
+ .define("PICKER_AUDIO"),
+ .define("PICKER_DOCUMENT")
+ ]
+ )
+ ]
+)
diff --git a/ios/Classes/FileInfo.m b/ios/file_picker/Sources/file_picker/FileInfo.m
similarity index 100%
rename from ios/Classes/FileInfo.m
rename to ios/file_picker/Sources/file_picker/FileInfo.m
diff --git a/ios/Classes/FilePickerPlugin.m b/ios/file_picker/Sources/file_picker/FilePickerPlugin.m
similarity index 99%
rename from ios/Classes/FilePickerPlugin.m
rename to ios/file_picker/Sources/file_picker/FilePickerPlugin.m
index 5023f216..09592017 100644
--- a/ios/Classes/FilePickerPlugin.m
+++ b/ios/file_picker/Sources/file_picker/FilePickerPlugin.m
@@ -1,6 +1,7 @@
#import "FilePickerPlugin.h"
#import "FileUtils.h"
#import "ImageUtils.h"
+#import
#ifdef PICKER_MEDIA
@import DKImagePickerController;
diff --git a/ios/Classes/FileUtils.m b/ios/file_picker/Sources/file_picker/FileUtils.m
similarity index 100%
rename from ios/Classes/FileUtils.m
rename to ios/file_picker/Sources/file_picker/FileUtils.m
diff --git a/ios/Classes/ImageUtils.m b/ios/file_picker/Sources/file_picker/ImageUtils.m
similarity index 98%
rename from ios/Classes/ImageUtils.m
rename to ios/file_picker/Sources/file_picker/ImageUtils.m
index 752b4da2..ba8594f9 100644
--- a/ios/Classes/ImageUtils.m
+++ b/ios/file_picker/Sources/file_picker/ImageUtils.m
@@ -6,6 +6,7 @@
//
#import "ImageUtils.h"
+#import
@implementation ImageUtils
diff --git a/ios/Resources/PrivacyInfo.xcprivacy b/ios/file_picker/Sources/file_picker/PrivacyInfo.xcprivacy
similarity index 100%
rename from ios/Resources/PrivacyInfo.xcprivacy
rename to ios/file_picker/Sources/file_picker/PrivacyInfo.xcprivacy
diff --git a/ios/file_picker/Sources/file_picker/include/file_picker-umbrella.h b/ios/file_picker/Sources/file_picker/include/file_picker-umbrella.h
new file mode 100644
index 00000000..56ad254a
--- /dev/null
+++ b/ios/file_picker/Sources/file_picker/include/file_picker-umbrella.h
@@ -0,0 +1,4 @@
+#import
+#import
+#import
+#import
diff --git a/ios/file_picker/Sources/file_picker/include/file_picker.modulemap b/ios/file_picker/Sources/file_picker/include/file_picker.modulemap
new file mode 100644
index 00000000..3edf5931
--- /dev/null
+++ b/ios/file_picker/Sources/file_picker/include/file_picker.modulemap
@@ -0,0 +1,6 @@
+framework module file_picker {
+ umbrella header "file_picker-umbrella.h"
+
+ export *
+ module * { export * }
+}
diff --git a/ios/Classes/FileInfo.h b/ios/file_picker/Sources/file_picker/include/file_picker/FileInfo.h
similarity index 94%
rename from ios/Classes/FileInfo.h
rename to ios/file_picker/Sources/file_picker/include/file_picker/FileInfo.h
index 2ed24c16..f92cfa5d 100644
--- a/ios/Classes/FileInfo.h
+++ b/ios/file_picker/Sources/file_picker/include/file_picker/FileInfo.h
@@ -5,6 +5,8 @@
// Created by Miguel Ruivo on 11/09/2020.
//
+#import
+
@interface FileInfo : NSObject
@property (nonatomic, strong) NSString * path;
@@ -19,4 +21,3 @@
- (NSDictionary *) toData;
@end
-
diff --git a/ios/Classes/FilePickerPlugin.h b/ios/file_picker/Sources/file_picker/include/file_picker/FilePickerPlugin.h
similarity index 100%
rename from ios/Classes/FilePickerPlugin.h
rename to ios/file_picker/Sources/file_picker/include/file_picker/FilePickerPlugin.h
diff --git a/ios/Classes/FileUtils.h b/ios/file_picker/Sources/file_picker/include/file_picker/FileUtils.h
similarity index 100%
rename from ios/Classes/FileUtils.h
rename to ios/file_picker/Sources/file_picker/include/file_picker/FileUtils.h
diff --git a/ios/Classes/ImageUtils.h b/ios/file_picker/Sources/file_picker/include/file_picker/ImageUtils.h
similarity index 93%
rename from ios/Classes/ImageUtils.h
rename to ios/file_picker/Sources/file_picker/include/file_picker/ImageUtils.h
index 9c9a5a72..b64b228b 100644
--- a/ios/Classes/ImageUtils.h
+++ b/ios/file_picker/Sources/file_picker/include/file_picker/ImageUtils.h
@@ -5,6 +5,8 @@
// Created by Miguel Ruivo on 05/03/2019.
//
+#import
+
@interface ImageUtils : NSObject
+ (BOOL)hasAlpha:(UIImage *)image;
+ (NSURL*)saveTmpImage:(UIImage *)image;
diff --git a/macos/file_picker.podspec b/macos/file_picker.podspec
index 98c29490..5319f8bf 100644
--- a/macos/file_picker.podspec
+++ b/macos/file_picker.podspec
@@ -13,9 +13,9 @@ A flutter plugin to show native file picker dialogs
s.license = { :file => '../LICENSE' }
s.author = 'Miguel Ruivo, Dominik Roszkowski'
s.source = { :path => '.' }
- s.source_files = 'Classes/**/*'
+ s.source_files = 'file_picker/Sources/**/*.swift'
- s.resource_bundles = {'file_picker_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
+ s.resource_bundles = {'file_picker_privacy' => ['file_picker/Sources/file_picker/PrivacyInfo.xcprivacy']}
s.dependency 'FlutterMacOS'
diff --git a/macos/file_picker/Package.swift b/macos/file_picker/Package.swift
new file mode 100644
index 00000000..6fbf9769
--- /dev/null
+++ b/macos/file_picker/Package.swift
@@ -0,0 +1,24 @@
+// 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: "file_picker",
+ platforms: [
+ .macOS("10.13")
+ ],
+ products: [
+ .library(name: "file-picker", targets: ["file_picker"])
+ ],
+ dependencies: [],
+ targets: [
+ .target(
+ name: "file_picker",
+ dependencies: [],
+ resources: [
+ .process("PrivacyInfo.xcprivacy")
+ ]
+ )
+ ]
+)
diff --git a/macos/Classes/FilePickerPlugin.swift b/macos/file_picker/Sources/file_picker/FilePickerPlugin.swift
similarity index 100%
rename from macos/Classes/FilePickerPlugin.swift
rename to macos/file_picker/Sources/file_picker/FilePickerPlugin.swift
diff --git a/macos/Resources/PrivacyInfo.xcprivacy b/macos/file_picker/Sources/file_picker/PrivacyInfo.xcprivacy
similarity index 100%
rename from macos/Resources/PrivacyInfo.xcprivacy
rename to macos/file_picker/Sources/file_picker/PrivacyInfo.xcprivacy
diff --git a/pubspec.yaml b/pubspec.yaml
index 9f9ff0a0..b2b0bdc4 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -3,7 +3,7 @@ description: A package that allows you to use a native file explorer to pick sin
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
repository: https://github.com/miguelpruivo/flutter_file_picker
issue_tracker: https://github.com/miguelpruivo/flutter_file_picker/issues
-version: 8.2.0
+version: 8.3.0
dependencies:
flutter: