Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swiftui-packages/image-picker-module
The image picker allow to take pictures with the devices camera or select pictures from the library. It takes care of state management and handles the case of no camera access.
https://github.com/swiftui-packages/image-picker-module
apple iod ipados spm swift swift-package swift-package-manager swift-packages swift-ui swiftui xcode
Last synced: 3 months ago
JSON representation
The image picker allow to take pictures with the devices camera or select pictures from the library. It takes care of state management and handles the case of no camera access.
- Host: GitHub
- URL: https://github.com/swiftui-packages/image-picker-module
- Owner: swiftui-packages
- License: gpl-3.0
- Created: 2021-08-21T17:34:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-25T08:33:53.000Z (about 2 years ago)
- Last Synced: 2024-03-14T19:18:11.417Z (10 months ago)
- Topics: apple, iod, ipados, spm, swift, swift-package, swift-package-manager, swift-packages, swift-ui, swiftui, xcode
- Language: Swift
- Size: 26.4 KB
- Stars: 5
- Watchers: 0
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Image Picker Module
[![build](https://github.com/swiftui-packages/image-picker-module/actions/workflows/build.yml/badge.svg)](https://github.com/swiftui-packages/image-picker-module/actions/workflows/build.yml)
[![test](https://github.com/swiftui-packages/image-picker-module/actions/workflows/test.yml/badge.svg)](https://github.com/swiftui-packages/image-picker-module/actions/workflows/test.yml)
[![swiftlint](https://github.com/swiftui-packages/image-picker-module/actions/workflows/swiftlint.yml/badge.svg)](https://github.com/swiftui-packages/image-picker-module/actions/workflows/swiftlint.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d62a7ab525064c0d9a8a9f5a667b2506)](https://www.codacy.com/gh/swiftui-packages/image-picker-module/dashboard?utm_source=github.com&utm_medium=referral&utm_content=swiftui-packages/image-picker-module&utm_campaign=Badge_Grade)
[![swiftpackageindex swift versions](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fswiftui-packages%2Fimage-picker-module%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/swiftui-packages/image-picker-module)
[![swiftpackageindex platforms](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fswiftui-packages%2Fimage-picker-module%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/swiftui-packages/image-picker-module)## Usage
You have 3 options to make use of the Image Picker Module in your SwiftUI project:1. Use plain ImagePicker which has the parameters soruce type and a completion function, which returns the selected picture or taken photo
2. Use the ImagePickerButton which takes a binding of an optional UIImage and lets you define a label for the button. The Button itself comes with some functionality, which will be expanded in the future. For example does it detect if a photo was taken and shows you the option to remove it or show it in full screen.
3. Use the ImagesPickerButton, which is supposed to expand image collections and there for takes a UIImage Array Binding and again lets you set its label.
## Integration
1. Copy the resource url:
```
https://github.com/swiftui-packages/image-picker-module.git
```2. Open your Xcode project
3. Two options a and b for step 3
a) At the menu bar navigate to _File_ / _Swift Packages_ / _Add Package Dependency_
b1) Select the project's root folder
b2) select your app name under _PROJECT_
b3) Open _Swift Packages_ tab on the right side of _Info_ and _Build Settings_
b4) Hit the _+_ button at the bottom of the list4. Here you should be prompted to "_Choose Package Repository:_"
5. Paste the resource url
6. Select _Next_ to go with the latest version or select a specific version or branch
7. After a short loading period of package resolution you get prompted to _Choose package products and targets_ (the default should be fine)
8. The complete hit the _Finish_ button
9. Import ImagePickerModule into the files where you want to use it
## required info.plist entries
- _Privacy - Camera Usage Description_
## Can also be found here
- [Swift Package Registry](https://swiftpackageregistry.com/swiftui-packages/image-picker-module)
- [Swift Package Index](https://swiftpackageindex.com/swiftui-packages/image-picker-module)
- [Swift Pack](https://swiftpack.co/package/swiftui-packages/image-picker-module)
## ToDos
- maintaining README.md file
- GIF of importing Swift Package Manager Packages into Xcode Projects
- phrasing an introduction text
- writing usage instructions with code examples