forem / ForemWebView-ios

Forem core interface SDK
GNU General Public License v3.0
22 stars 7 forks source link

Refactor Native Image Picker #36

Open fdocr opened 3 years ago

fdocr commented 3 years ago

Is your feature request related to a problem? Please describe.

For our first version we chose YPImagePicker because of their easy to use API and the fact that it supported all our requirements (basic Image Picker + camera photo + image crop) with the added benefit of adding filters (à la Instagram) with a nice interface.

However, we do have a few problems with it:

There are some efforts to fix the problem of SPM not being fully supported but we should probably look into implementing our own solution.

Describe the solution you'd like

A simple image picker that provides two choices when triggered (use photo from library or take a picture with the camera). After a photo is chosen, if a ratio is provided then proceed with a cropping stage. This image picker would replace the YPImagePicker implementation in this function.

By implementing the image picker using SwiftUI we could greatly reduce the transitive dependencies added to projects downstream from us.

Describe alternatives you've considered

We can look into other OSS Image Pickers but I would definitely favor implementing our own lightweight picker to reduce the impact of adding dependencies to projects downstream from us.

Additional context

N/A