diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Package.swift b/Package.swift index d93a6bb7..744874c2 100644 --- a/Package.swift +++ b/Package.swift @@ -1,11 +1,11 @@ -// swift-tools-version:5.1 +// swift-tools-version:5.8 import PackageDescription let package = Package( name: "ImagePicker", platforms: [ - .iOS(.v9) + .iOS(.v10) ], products: [ // Products define the executables and libraries produced by a package, and make them visible to other packages. diff --git a/Source/AssetManager.swift b/Source/AssetManager.swift index edb6e52d..ae630aba 100644 --- a/Source/AssetManager.swift +++ b/Source/AssetManager.swift @@ -4,13 +4,9 @@ import Photos extension Bundle { static func myResourceBundle() -> Bundle? { - let bundles = Bundle.allBundles - let bundlePaths = bundles.compactMap { $0.resourceURL?.appendingPathComponent("ImagePicker", isDirectory: false).appendingPathExtension("bundle") } - - return bundlePaths.compactMap({ Bundle(url: $0) }).first + return Bundle(for: ImagePickerController.self) } } - open class AssetManager { public static func getImage(_ name: String) -> UIImage {