Swiftpack.co - Package - AnyImageProject/AnyImageKit


GitHub Actions CocoaPods Compatible Carthage Compatible Platform License

AnyImageKit is a toolbox for picking, editing or capturing photos/videos, written in Swift.



  • ☑ Light mode, dark mode or auto mode support
  • ☑ Default theme is similar with Wechat
  • ☑ Multiple & mix select support
  • ☑ Supported media types:
    • ☑ Photo
    • ☑ GIF
    • ☑ Live Photo
    • ☑ Video
  • ☑ Camera
    • ☑ Photo
    • ☑ Video
    • ☐ Live Photo
    • ☐ GIF
    • ☐ Fliter Support
  • ☐ Edit image ( Technical Preview )
    • ☑ Drawing
    • ☐ Emoji
    • ☑ Input text
    • ☑ Cropping
    • ☑ Mosaic
    • ☐ Rotate
    • ☐ Fliter Support
  • ☐ Multiple platform support
    • ☑ iOS
    • ☑ iPadOS
    • ☐ Mac Catalyst ( Technical Preview, Not support in editor. Remove from support as Xcode 12.0 can't support Mac Catalyst 14.0 features. )
    • ☐ macOS
    • ☐ tvOS


  • iOS 10.0+
  • Xcode 12.2+
  • Swift 5.3+


Swift Package Manager

⚠️ Needs Xcode 12.0+ to support resources and localization files

dependencies: [
    .package(url: "https://github.com/AnyImageProject/AnyImageKit.git", .upToNextMajor(from: "0.9.0"))


Add this to Podfile, and then update dependency:

pod 'AnyImageKit'


Add this to Cartfile, and then update dependency:

github "AnyImageProject/AnyImageKit"

⚠️ Unsupport in Xcode 12.0, more details



Add these keys to your Info.plist when needed:

Key Module Info
NSPhotoLibraryUsageDescription Picker
NSPhotoLibraryAddUsageDescription Picker
PHPhotoLibraryPreventAutomaticLimitedAccessAlert Picker Set YES to prevent automatic limited access alert in iOS 14+ (Picker has been adapted with Limited features that can be triggered by the user to enhance the user experience)
NSCameraUsageDescription Capture
NSMicrophoneUsageDescription Capture

Quick Start

import AnyImageKit

class ViewController: UIViewController {

    @IBAction private func openPicker(_ sender: UIButton) {
        var options = PickerOptionsInfo()
          Your code, handle custom options
        let controller = ImagePickerController(options: options, delegate: self)
        present(controller, animated: true, completion: nil)

extension ViewController: ImagePickerControllerDelegate {

    func imagePickerDidCancel(_ picker: ImagePickerController) {
          Your code, handle user cancel
        picker.dismiss(animated: true, completion: nil)
    func imagePicker(_ picker: ImagePickerController, didFinishPicking result: PickerResult) {
        let images = result.assets.map { $0.image }
          Your code, handle selected assets
        picker.dismiss(animated: true, completion: nil)

Release Notes


AnyImageKit is released under the MIT license. See LICENSE for details.


Stars: 276


Used By

Total: 0


iOS 14++ -



  • AnyImageKit is now adapt for the latest iPhone 12/12 Pro series devices.

New Features

  • Core
    • Added ImageKitDataTrackDelegate for track page/event, supported page and events can be find HERE.
  • Picker
    • Picker now observe photo library changes on all supported iOS versions and loads library changes automatically.
    • Added preselection mode, set PickerOptionsInfo.preselectAssets: [String] to enable preselection.


  • Picker
    • Unify the color of the toolbar and navigation bar on selection.
    • Fixed an issue that picker reload photo library multiple times.
    • Fixed an issue that lose progress when fetch video from iCloud in iOS 14.
    • Now open the album will locate the current album.
  • Editor
    • Fixed an issue that the crop box going black in iOS 11.
    • When entering text in the editor, return key now shows as done instead of return.
  • Capture
    • Fixed an issue that the focus frame going black in iOS 11.

Incompatible changes

  • Picker/Editor/Capture now has an empty initialization method required init() and has changed the old method from required init(options: ...) to convenience init(options: ...) , to make it easier to subclass related items.
  • The delegate access control of Picker/Editor/Capture changes to open instead of open private(set) and can be changed after initialization.
  • The update(options: ...) method has been added in Picker/Editor/Capture, which should call before present.

iOS 14 & SPM -



  • AnyImageKit build with Xcode 12 instead of Xcode 11.
  • AnyImageKit use Swift Package Manager as dependency instead of Cocoapods.
  • AnyImageKit support Swift Package Manager.

New Features

  • Picker
    • Adapt iOS 14 “Limited Photos Library” mode.
  • Editor
    • Pen colors support UIColorWell in iOS 14.


We have modified the callback methods of the three modules to prepare for the stability of ABI in the future.


/// Original callback method
func imagePicker(_ picker: ImagePickerController, didFinishPicking assets: [Asset], useOriginalImage: Bool)
/// New callback method
/// PickerResult contains assets and useOriginalImage property
func imagePicker(_ picker: ImagePickerController, didFinishPicking result: PickerResult)


/// Original callback method
func imageEditor(_ editor: ImageEditorController, didFinishEditing mediaURL: URL, type: MediaType, isEdited: Bool)
/// New callback method
/// EditorResult contains mediaURL, type and isEdited property
func imageEditor(_ editor: ImageEditorController, didFinishEditing result: EditorResult)


/// Original callback method
func imageCapture(_ capture: ImageCaptureController, didFinishCapturing mediaURL: URL, type: MediaType)
/// New callback method
/// CaptureResult contains mediaURL and type property
func imageCapture(_ capture: ImageCaptureController, didFinishCapturing result: CaptureResult)


  • Editor
    • For support UIColorWell feature, the penColors property has been changed from [UIColor] to [EditorPenColorOption].


  • Picker
    • Fixed a bug that not clearing selected assets when switching albums.
    • Fixed a bug that the status of the toolbar at the bottom not update when switching albums.
    • Fixed a bug that the "camera item" appears repeatedly when switching albums.
  • Editor
    • Fixed an issue that the global breakpoint will be triggered at the first startup.
    • Fixed a bug that incomplete color display when input text.

Known Issues

  • Remove from support as Xcode 12.0 can't support Mac Catalyst 14.0 features.

Fix Xcode 12 simulator error -

  • Xcode 12 simulator error

Improved Capture -


  • Use Metal shader workflow instead of Core Image, which improved capture performance.
  • Use XCFramework for Binary Distribution.

Initial support for Xcode 12 -

  • fix compiler error for Xcode 12 beta 1

Capture support iPad -


  • Picker:
    • Add autoCalculateColumnNumber, in iOS column number is columnNumber, in iPadOS column number will calculated by device orientation or device size.


  • Capture:
    • Support iPad, in iPadOS will use UIImagePickerController instead.

New features -


  • Picker:

    • QuickPick: It will select photo instead of show preview controller when you click photo on asset picker controller.
  • Editor:

    • EditorCropOption: Crop photo with custom crop options.

Now you can use Picker and Editor to pick square avatar. Open AvatarPickerController in example project to know how to configure Picker and Editor.


  • Picker:
    • Support iPad.
  • Editor:
    • Can run on iPad but not perfect. Editor will exit when device rotation.


  • Picker:
    • App will stuck when fetch iCloud photo without network.
  • Editor:
    • Pen will lost sometime.
    • Enter text will lost when photo scale.

Bug Fix -


  • Error when use front capture
  • Improve Editor

Remove ParsedOptionsInfo/OptionsInfoItem -


  • Remove ParsedOptionsInfo/OptionsInfoItem

Capture -


  • Add Capture module
  • Add Video Editor, support clip video
  • Photo Editor support input text
  • All module support accessibility

Fix Video Export -


  • Fix video export progress

User Created Albums -


  • add AlbumOptions in ImagePickerController.Config

Prepare for Multiple Windows -

  • Remove singleton design for Picker/Editor manager.
  • AnyImageKit will support Multiple Windows later.
  • Optimize memory usage. Now you can select 20 photos directly.

Edtior -


  • Support image editor (Technical Preview)


  • Project has renamed to AnyImageKit

iPad & Mac Catalyst -


  • Support iPad
  • Support Mac Catalyst (Technical Preview)

Support Carthage Final -


  • Carthage Support

Join in AnyImageProject -


  • Fix small touch area for return button when preview.
  • Fix Carthage build.


  • Support LivePhoto.
  • Support capture photos or videos.

Hello World -

Hello, everyone!

This is our first pre-release, maybe has some bugs. Open an issue or pull request, we will solve it soon.