{"id":17968370,"url":"https://github.com/fulldecent/fdtake","last_synced_at":"2025-04-04T18:06:41.782Z","repository":{"id":4291284,"uuid":"5421555","full_name":"fulldecent/FDTake","owner":"fulldecent","description":"Easily take a photo or video or choose from library","archived":false,"fork":false,"pushed_at":"2022-12-14T08:34:46.000Z","size":581,"stargazers_count":320,"open_issues_count":6,"forks_count":118,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-03-28T17:06:59.892Z","etag":null,"topics":["image","photo","swift","uiimagepickercontroller"],"latest_commit_sha":null,"homepage":null,"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/fulldecent.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["fulldecent"],"custom":["https://www.paypal.me/fulldecent","https://amazon.com/hz/wishlist/ls/EE78A23EEGQB"]}},"created_at":"2012-08-15T03:19:44.000Z","updated_at":"2025-03-27T02:20:16.000Z","dependencies_parsed_at":"2022-11-28T10:33:58.784Z","dependency_job_id":null,"html_url":"https://github.com/fulldecent/FDTake","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2FFDTake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2FFDTake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2FFDTake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2FFDTake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fulldecent","download_url":"https://codeload.github.com/fulldecent/FDTake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226213,"owners_count":20904465,"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":["image","photo","swift","uiimagepickercontroller"],"created_at":"2024-10-29T14:21:08.511Z","updated_at":"2025-04-04T18:06:41.743Z","avatar_url":"https://github.com/fulldecent.png","language":"Swift","funding_links":["https://github.com/sponsors/fulldecent","https://www.paypal.me/fulldecent","https://amazon.com/hz/wishlist/ls/EE78A23EEGQB"],"categories":[],"sub_categories":[],"readme":"# FDTake\n\n[![CI Status](http://img.shields.io/travis/fulldecent/FDTake.svg?style=flat)](https://travis-ci.org/fulldecent/FDTake)\n[![Version](https://img.shields.io/cocoapods/v/FDTake.svg?style=flat)](http://cocoapods.org/pods/FDTake)\n[![License](https://img.shields.io/cocoapods/l/FDTake.svg?style=flat)](http://cocoapods.org/pods/FDTake)\n[![Platform](https://img.shields.io/cocoapods/p/FDTake.svg?style=flat)](http://cocoapods.org/pods/FDTake)\n[![Readme Score](http://readme-score-api.herokuapp.com/score.svg?url=fulldecent/FDTake)](http://clayallsopp.github.io/readme-score?url=fulldecent/FDTake)\n\nEasily take a photo or video or choose from library\n\n**:beer: Author's tip jar: https://amazon.com/hz/wishlist/ls/EE78A23EEGQB**\n\n## Usage\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\nTo use it in your project, add an `FDTakeController` to your view controller and implement:\n\n    fdTakeController.didGetPhoto = {\n        (_ photo: UIImage, _ info: [AnyHashable : Any]) in\n    }\n\nthen call:\n\n    fdTakeController.present()\n\nThe full API is:\n\n```swift\n/// Public initializer\npublic override init()\n\n/// Convenience method for getting a photo\nopen class func getPhotoWithCallback(getPhotoWithCallback callback: @escaping (_ photo: UIImage, _ info: [AnyHashable : Any]) -\u003e Void) -\u003e \u003c\u003cerror type\u003e\u003e\n\n/// Convenience method for getting a video\nopen class func getVideoWithCallback(getVideoWithCallback callback: @escaping (_ video: URL, _ info: [AnyHashable : Any]) -\u003e Void)\n\n/// Whether to allow selecting a photo\nopen var allowsPhoto: Bool\n\n/// Whether to allow selecting a video\nopen var allowsVideo: Bool\n\n/// Whether to allow capturing a photo/video with the camera\nopen var allowsTake: Bool\n\n/// Whether to allow selecting existing media\nopen var allowsSelectFromLibrary: Bool\n\n/// Whether to allow editing the media after capturing/selection\nopen var allowsEditing: Bool\n\n/// Whether to use full screen camera preview on the iPad\nopen var iPadUsesFullScreenCamera: Bool\n\n/// Enable selfie mode by default\nopen var defaultsToFrontCamera: Bool\n\n/// The UIBarButtonItem to present from (may be replaced by overloaded methods)\nopen var presentingBarButtonItem: UIBarButtonItem?\n\n/// The UIView to present from (may be replaced by overloaded methods)\nopen var presentingView: UIView?\n\n/// The UIRect to present from (may be replaced by overloaded methods)\nopen var presentingRect: CGRect?\n\n/// The UITabBar to present from (may be replaced by overloaded methods)\nopen var presentingTabBar: UITabBar?\n\n/// The UIViewController to present from (may be replaced by overloaded methods)\nopen lazy var presentingViewController: UIViewController { get set }\n\n/// A photo was selected\nopen var didGetPhoto: ((_ photo: UIImage, _ info: [AnyHashable : Any]) -\u003e Void)?\n\n/// A video was selected\nopen var didGetVideo: ((_ video: URL, _ info: [AnyHashable : Any]) -\u003e Void)?\n\n/// The user did not attempt to select a photo\nopen var didDeny: (() -\u003e Void)?\n\n/// The user started selecting a photo or took a photo and then hit cancel\nopen var didCancel: (() -\u003e Void)?\n\n/// A photo or video was selected but the ImagePicker had NIL for EditedImage and OriginalImage\nopen var didFail: (() -\u003e Void)?\n\n/// Custom UI text (skips localization)\nopen var cancelText: String?\n\n/// Custom UI text (skips localization)\nopen var chooseFromLibraryText: String?\n\n/// Custom UI text (skips localization)\nopen var chooseFromPhotoRollText: String?\n\n/// Custom UI text (skips localization)\nopen var noSourcesText: String?\n\n/// Custom UI text (skips localization)\nopen var takePhotoText: String?\n\n/// Custom UI text (skips localization)\nopen var takeVideoText: String?\n\n/// Presents the user with an option to take a photo or choose a photo from the library\nopen func present()\n\n/// Dismisses the displayed view. Especially handy if the sheet is displayed while suspending the app,\nopen func dismiss()\n```\n\nOther available options are documented at \u003ca href=\"http://cocoadocs.org/docsets/FDTake/\"\u003eCocoaDocs for FDTake\u003c/a\u003e.\n\n\n## How it works\n\n 1. See if device has camera\n 2. Create action sheet with appropriate options (\"Take Photo\" or \"Choose from Library\"), as available\n 3. Localize \"Take Photo\" and \"Choose from Library\" into user's language\n 4. Wait for response\n 5. Bring up image picker with selected image picking method\n 6. Default to selfie mode if so configured\n 7. Get response, extract image from a dictionary\n 8. Dismiss picker, send image to delegate\n\n\n## Support\n\n * Supports iPhones, iPods, iPads and tvOS (but not tested)\n * Supported languages:\n   - English\n   - Chinese Simplified\n   - Turkish (thanks Suleyman Melikoglu)\n   - French (thanks Guillaume Algis)\n   - Dutch (thanks Mathijs Kadijk)\n   - Chinese Traditional (thanks Qing Ao)\n   - German (thanks Lars Häuser)\n   - Russian (thanks Alexander Zubkov)\n   - Norwegian (thanks Sindre Sorhus)\n   - Arabic (thanks HadiIOS)\n   - Polish (thanks Jacek Kwiecień)\n   - Spanish (thanks David Jorge)\n   - Hebrew (thanks Asaf Siman-Tov)\n   - Danish (thanks kaspernissen)\n   - Sweedish (thanks Paul Peelen)\n   - Portugese (thanks Natan Rolnik)\n   - Greek (thanks Konstantinos)\n   - Italian (thanks Giuseppe Filograno)\n   - Hungarian (thanks Andras Kadar)\n   - Please help translate \u003ca href=\"https://github.com/fulldecent/FDTake/blob/master/FDTakeExample/en.lproj/FDTake.strings\"\u003e`FDTake.strings`\u003c/a\u003e to more languages\n * Pure Swift support and iOS 8+ required\n * Compile testing running on Travis CI\n * In progress: functional test cases ([please help](https://github.com/fulldecent/FDTake/issues/72))\n * In progress: UI test cases ([please help](https://github.com/fulldecent/FDTake/issues/72))\n\n\n## Installation\n\nAdd this to your project using Swift Package Manager. In Xcode that is simply: File \u003e Swift Packages \u003e Add Package Dependency... and you're done. Alternative installation options are shown below for legacy projects.\n\n### CocoaPods\n\nIf you are already using [CocoaPods](http://cocoapods.org), just add 'FDTake' to your `Podfile` then run `pod install`.\n\n### Carthage\n\nIf you are already using [Carthage](https://github.com/Carthage/Carthage), just add to your `Cartfile`:\n\n```ogdl\ngithub \"fulldecent/FDTake\"\n```\n\nThen run `carthage update` to build the framework and drag the built `FDTake`.framework into your Xcode project.\n\n\n## Author\n\nWilliam Entriken, github.com@phor.net\n\n## Project scope\n\nThis is a mature project and we do not expect to add new features unless something has already become state-of-the-art in other applications. Please be prepared to cite screenshots of other apps before making a feature request.\n\nWe support targets for the latest released versions of Xcode, Carthage, CocoaPods and Swift Package Manager. If there are incompatabilities, for example CocoaPods not supporting the latest version of Xcode, then we will only support the latest released versions/combinations that are supported. If you would like to support pre-release versions of these packages, please open a pull request, not an issue.\n\n## License\n\nFDTake is available under the MIT license. See the LICENSE file for more info.\n\n## Contributing\n\nThis project's layout is based on https://github.com/fulldecent/swift4-module-template If you would like to change the layout, please change that project FIRST. Also you may appreciate that project has \"recipes\" -- you don't just change the code, you explain why you are doing things. As a maintainer this makes my job MUCH simpler. In a similar respect, if you are introducing non-minor changes, it will be VERY helpful if you could please reference to another project (like AlamoFire) that has seen and discussed the types of design challenges you are touching.) Thanks again and we all really do appreciate your contributions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulldecent%2Ffdtake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffulldecent%2Ffdtake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulldecent%2Ffdtake/lists"}