swiftui-packages/image-picker-module
You have 3 options to make use of the Image Picker Module in your SwiftUI project:
Usage
You have 3 options to make use of the Image Picker Module in your SwiftUI project:
- Use plain ImagePicker which has the parameters soruce type and a completion function, which returns the selected picture or taken photo
- 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.
- 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.
<br>
Integration
- Copy the resource url:
https://github.com/swiftui-packages/image-picker-module.git- Open your Xcode project
- Two options a and b for step 3<br>
a) At the menu bar navigate to File / Swift Packages / Add Package Dependency<br> b1) Select the project's root folder<br> b2) select your app name under PROJECT<br> b3) Open Swift Packages tab on the right side of Info and Build Settings<br> b4) Hit the + button at the bottom of the list<br>
- Here you should be prompted to "Choose Package Repository:"
- Paste the resource url
- Select Next to go with the latest version or select a specific version or branch
- After a short loading period of package resolution you get prompted to Choose package products and targets (the default should be fine)
- The complete hit the Finish button
- Import ImagePickerModule into the files where you want to use it
<br>
required info.plist entries
- Privacy - Camera Usage Description
<br>
Can also be found here
<br>
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
Package Metadata
Repository: swiftui-packages/image-picker-module
Default branch: main
README: README.md