Skip to content

The image picker allow to take pictures or video with the devices camera or select pictures or videos from the library. It takes care of state management and handles the case of no camera or microphone access.

License

Notifications You must be signed in to change notification settings

Kuama-IT/image-picker-module

 
 

Repository files navigation

Image Picker Module

build test swiftlint Codacy Badge swiftpackageindex swift versions swiftpackageindex platforms

Usage

You have 3 options to make use of the Image Picker Module in your SwiftUI project:

  1. Use plain MediaPicker which has the parameters source type and a completion function, which returns the selected picture or taken photo/video
  2. Use the SingleMediaPickerButton which takes a binding of an optional UIImage and URL 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/video was taken and shows you the option to remove it or show it in full screen.
  3. Use the MediasPickerButton, which is supposed to expand image/video collections and there for takes a UIImage Array Binding/ URL Array Binding and again lets you set its label.

Integration

  1. Copy the resource url:
https://github.com/Kuama-IT/image-picker-module.git
  1. Open your Xcode project

  2. 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 list

  3. Here you should be prompted to "Choose Package Repository:"

  4. Paste the resource url

  5. Select Next to go with the latest version or select a specific version or branch

  6. After a short loading period of package resolution you get prompted to Choose package products and targets (the default should be fine)

  7. The complete hit the Finish button

  8. Import ImagePickerModule into the files where you want to use it


required info.plist entries

  • Privacy - Camera Usage Description
  • Privacy - Microphone Usage Description

Can also be found here


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

About

The image picker allow to take pictures or video with the devices camera or select pictures or videos from the library. It takes care of state management and handles the case of no camera or microphone access.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 100.0%