{"id":19643869,"url":"https://github.com/duzexu/adphotokit","last_synced_at":"2025-07-28T12:42:53.194Z","repository":{"id":56900249,"uuid":"361687483","full_name":"duzexu/ADPhotoKit","owner":"duzexu","description":"A library for select photos from album implemented by pure-Swift.","archived":false,"fork":false,"pushed_at":"2024-11-21T07:59:38.000Z","size":19078,"stargazers_count":10,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T08:18:33.388Z","etag":null,"topics":["album","imagepicker","ios","photo","swift"],"latest_commit_sha":null,"homepage":"https://duzexu.github.io/ADPhotoKit/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duzexu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-04-26T09:13:32.000Z","updated_at":"2024-11-22T00:42:00.000Z","dependencies_parsed_at":"2022-08-20T18:20:34.607Z","dependency_job_id":"823716b2-b9a2-4606-b81e-c6332fdc164b","html_url":"https://github.com/duzexu/ADPhotoKit","commit_stats":{"total_commits":114,"total_committers":1,"mean_commits":114.0,"dds":0.0,"last_synced_commit":"949494f83bab3ed24271323bb4690b4e9d88b698"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzexu%2FADPhotoKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzexu%2FADPhotoKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzexu%2FADPhotoKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzexu%2FADPhotoKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duzexu","download_url":"https://codeload.github.com/duzexu/ADPhotoKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251319757,"owners_count":21570451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["album","imagepicker","ios","photo","swift"],"created_at":"2024-11-11T14:24:24.686Z","updated_at":"2025-07-28T12:42:53.187Z","avatar_url":"https://github.com/duzexu.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/duzexu/ADPhotoKit/master/ADPhotoKit/ADPhotoKit.docc/Resources/logo@3x.png\" alt=\"ADPhotoKit\" title=\"ADPhotoKit\" width=\"557\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://swift.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Language-%20Swift%20-E57141.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://duzexu.github.io/ADPhotoKit/\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/p/ADPhotoKit.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://duzexu.github.io/ADPhotoKit/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Swift-Doc-DE5C43.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://cocoapods.org/pods/ADPhotoKit\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/v/ADPhotoKit.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://swift.org/package-manager/\"\u003e\u003cimg src=\"https://img.shields.io/badge/SPM-supported-DE5C43.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://raw.githubusercontent.com/duzexu/ADPhotoKit/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-black\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nADPhotoKit is a pure-Swift library to select assets (e.g. photo,video,gif,livephoto) from system album. Default appearance is Wechat-like.\n\n## Features\n\n* [x] Well documentation.\n* [x] Supports both single and multiple selection.\n* [x] Supports filtering albums and sorting by type.\n* [x] iCloud Support.\n* [x] Multi-language.\n* [x] Highly customizable base on protocol(UI/Image/Color/Font).\n* [x] UIAppearance support.\n* [x] Supports batch export PHAsset to image.\n* [x] Image editor.\n* [x] Video editor.\n* [x] DocC support.\n* [x] SwiftUI support.\n* [x] Custom capture support.\n\n## Usage\n\n### Quick Start\n\nThe simplest use-case is present the image picker on your controller:\n\n```swift\nADPhotoKitUI.imagePicker(present: self) { (assets, origin) in\n    // do something\n}\n```\n\nAlso you can present the image pricker on swiftUI:\n\n```\nimport SwiftUI\n\nstruct SwiftUIView: View {\n    \n    @State private var showImagePicker = false\n    \n    var body: some View {\n        Button(\"PickerImage\") {\n            showImagePicker.toggle()\n        }\n        .imagePicker(isPresented: $showImagePicker,\n                     selected: { (assets, origin) in\n            // do something\n        })\n    }\n}\n```\n\n### More Advanced Example\n\nSelect up to 9 images or videos:\n\n```swift\nADPhotoKitUI.imagePicker(present: self,\n                          params: [.maxCount(max: 9)],\n                        selected: { (assets, origin) in\n    // do something\n})\n```\n\nSelect 1 video or 9 images:\n\n```swift\nADPhotoKitUI.imagePicker(present: self,\n                       assetOpts: .exclusive,\n                          params: [.maxCount(max: 9),.imageCount(min: nil, max: 9),.videoCount(min: nil, max: 1)],\n                        selected: { (assets, origin) in\n    // do something\n})\n```\n\nSelect max 8 images:\n\n```swift\nADPhotoKitUI.imagePicker(present: self,\n                       albumOpts: [.allowImage],\n                       assetOpts: .exclusive,\n                          params: [.maxCount(max: 8)],\n                        selected: { (assets, origin) in\n    // do something\n})\n```\n\nBrowser network image and video:\n\n```swift\nADPhotoKitUI.assetBrowser(present: self, \n                           assets: [NetImage(url: \"https://example.com/xx.png\"), NetVideo(url: \"https://example.com/xx.mp4\")]) { assets in\n    // do something\n}\n```\n\nFor more usage configuration, you can see [ADPhotoKitConfiguration](./ADPhotoKit/Classes/Base/ADPhotoKitConfiguration.swift) and [SelectionRestrict](./ADPhotoKit/ADPhotoKit.docc/SelectionRestrict.md).\n\n## Learn More\n\nTo lean more use of ADPhotoKit, refer to the example and [API Reference](https://duzexu.github.io/ADPhotoKit/).\n\n## Requirements\n\n* iOS 10.0\n* Swift 5.0+\n* Xcode 15+\n\n\u003e Objective-C is not supported. Swift is the future and dropping Obj-C is the price to pay to keep our velocity on this library :)\n\n### Installation\n\n#### CocoaPods\n\nADPhotoKit is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\nsource 'https://cdn.cocoapods.org/'\nplatform :ios, '10.0'\nuse_frameworks!\n\ntarget 'MyApp' do\n  pod 'ADPhotoKit'\nend\n```\n\n\u003e DocC support need cocoaPods 1.12.0+\n\n##### Subspecs\n\nThere are 4 subspecs available now:\n\n| Subspec | Description |\n|---|---|\n| Base | Required. This subspec provides base configuration and extensions. |\n| Core | Optional. This subspec provides raw data. Depend on Base subspec. |\n| CoreUI | Optional. The subspec provides ui for photo select. Depend on Core subspec. |\n| ImageEdit | Optional. The subspec provides image edit ability. Depend on Base subspec. |\n| VideoEdit | Optional. The subspec provides video edit ability. Depend on Base subspec. |\n\nYou can install only some of the ADPhotoKit modules. By default, you get `CoreUI` subspecs.\n\n#### Swift Package Manager\n\n* File \u003e Swift Packages \u003e Add Package Dependency\n* Add https://github.com/duzexu/ADPhotoKit.git\n* Select \"Branch\" with \"master\"\n\n#### Note\n\n\u003cfont color=#B30E44\u003e**You need to add the following key-value pairs in your app's Info.plist**\u003c/font\u003e\n\n```swift\n// If you don’t add this key-value pair, multiple languages are not supported, and the system PhotoKitUI language defaults to English\nLocalized resources can be mixed   YES\n// You must add follow in your app's Info.plist\nPrivacy - Photo Library Usage Description\n// If you `assetOpts` contain `allowTakePhotoAsset`, you must add follow\nPrivacy - Camera Usage Description\n// If you `assetOpts` contain `allowTakeVideoAsset`, you must add follow\nPrivacy - Microphone Usage Description\n```\n\n## Contributing\n\nIf you have feature requests or bug reports, feel free to help out by sending pull requests or by creating new issues.\n\n## License\n\nADPhotoKit is available under the MIT license. See the LICENSE file for more info.\n\n\u003e Some code and resource are copy from **ZLPhotoBrowser**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduzexu%2Fadphotokit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduzexu%2Fadphotokit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduzexu%2Fadphotokit/lists"}